diff options
36 files changed, 134 insertions, 95 deletions
diff --git a/cyw43/Cargo.toml b/cyw43/Cargo.toml index 789e3ab05..3e37a8cd1 100644 --- a/cyw43/Cargo.toml +++ b/cyw43/Cargo.toml | |||
| @@ -23,7 +23,7 @@ cortex-m = "0.7.6" | |||
| 23 | cortex-m-rt = "0.7.0" | 23 | cortex-m-rt = "0.7.0" |
| 24 | futures = { version = "0.3.17", default-features = false, features = ["async-await", "cfg-target-has-atomic", "unstable"] } | 24 | futures = { version = "0.3.17", default-features = false, features = ["async-await", "cfg-target-has-atomic", "unstable"] } |
| 25 | 25 | ||
| 26 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-rc.1" } | 26 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-rc.2" } |
| 27 | num_enum = { version = "0.5.7", default-features = false } | 27 | num_enum = { version = "0.5.7", default-features = false } |
| 28 | 28 | ||
| 29 | [package.metadata.embassy_docs] | 29 | [package.metadata.embassy_docs] |
diff --git a/embassy-embedded-hal/Cargo.toml b/embassy-embedded-hal/Cargo.toml index 11e47acb8..52ecd5c71 100644 --- a/embassy-embedded-hal/Cargo.toml +++ b/embassy-embedded-hal/Cargo.toml | |||
| @@ -25,8 +25,8 @@ embassy-time = { version = "0.1.5", path = "../embassy-time", optional = true } | |||
| 25 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = [ | 25 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = [ |
| 26 | "unproven", | 26 | "unproven", |
| 27 | ] } | 27 | ] } |
| 28 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" } | 28 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } |
| 29 | embedded-hal-async = { version = "=1.0.0-rc.1", optional = true } | 29 | embedded-hal-async = { version = "=1.0.0-rc.2", optional = true } |
| 30 | embedded-storage = "0.3.0" | 30 | embedded-storage = "0.3.0" |
| 31 | embedded-storage-async = { version = "0.4.0", optional = true } | 31 | embedded-storage-async = { version = "0.4.0", optional = true } |
| 32 | nb = "1.0.0" | 32 | nb = "1.0.0" |
diff --git a/embassy-embedded-hal/src/shared_bus/asynch/spi.rs b/embassy-embedded-hal/src/shared_bus/asynch/spi.rs index 17d5f3676..b4f53c623 100644 --- a/embassy-embedded-hal/src/shared_bus/asynch/spi.rs +++ b/embassy-embedded-hal/src/shared_bus/asynch/spi.rs | |||
| @@ -63,6 +63,10 @@ where | |||
| 63 | CS: OutputPin, | 63 | CS: OutputPin, |
| 64 | { | 64 | { |
| 65 | async fn transaction(&mut self, operations: &mut [spi::Operation<'_, u8>]) -> Result<(), Self::Error> { | 65 | async fn transaction(&mut self, operations: &mut [spi::Operation<'_, u8>]) -> Result<(), Self::Error> { |
| 66 | if cfg!(not(feature = "time")) && operations.iter().any(|op| matches!(op, Operation::DelayNs(_))) { | ||
| 67 | return Err(SpiDeviceError::DelayNotSupported); | ||
| 68 | } | ||
| 69 | |||
| 66 | let mut bus = self.bus.lock().await; | 70 | let mut bus = self.bus.lock().await; |
| 67 | self.cs.set_low().map_err(SpiDeviceError::Cs)?; | 71 | self.cs.set_low().map_err(SpiDeviceError::Cs)?; |
| 68 | 72 | ||
| @@ -74,12 +78,12 @@ where | |||
| 74 | Operation::Transfer(read, write) => bus.transfer(read, write).await, | 78 | Operation::Transfer(read, write) => bus.transfer(read, write).await, |
| 75 | Operation::TransferInPlace(buf) => bus.transfer_in_place(buf).await, | 79 | Operation::TransferInPlace(buf) => bus.transfer_in_place(buf).await, |
| 76 | #[cfg(not(feature = "time"))] | 80 | #[cfg(not(feature = "time"))] |
| 77 | Operation::DelayUs(us) => return Err(SpiDeviceError::DelayUsNotSupported), | 81 | Operation::DelayNs(_) => unreachable!(), |
| 78 | #[cfg(feature = "time")] | 82 | #[cfg(feature = "time")] |
| 79 | Operation::DelayUs(us) => match bus.flush().await { | 83 | Operation::DelayNs(ns) => match bus.flush().await { |
| 80 | Err(e) => Err(e), | 84 | Err(e) => Err(e), |
| 81 | Ok(()) => { | 85 | Ok(()) => { |
| 82 | embassy_time::Timer::after_micros(*us as _).await; | 86 | embassy_time::Timer::after_nanos(*ns as _).await; |
| 83 | Ok(()) | 87 | Ok(()) |
| 84 | } | 88 | } |
| 85 | }, | 89 | }, |
| @@ -137,6 +141,10 @@ where | |||
| 137 | CS: OutputPin, | 141 | CS: OutputPin, |
| 138 | { | 142 | { |
| 139 | async fn transaction(&mut self, operations: &mut [spi::Operation<'_, u8>]) -> Result<(), Self::Error> { | 143 | async fn transaction(&mut self, operations: &mut [spi::Operation<'_, u8>]) -> Result<(), Self::Error> { |
| 144 | if cfg!(not(feature = "time")) && operations.iter().any(|op| matches!(op, Operation::DelayNs(_))) { | ||
| 145 | return Err(SpiDeviceError::DelayNotSupported); | ||
| 146 | } | ||
| 147 | |||
| 140 | let mut bus = self.bus.lock().await; | 148 | let mut bus = self.bus.lock().await; |
| 141 | bus.set_config(&self.config).map_err(|_| SpiDeviceError::Config)?; | 149 | bus.set_config(&self.config).map_err(|_| SpiDeviceError::Config)?; |
| 142 | self.cs.set_low().map_err(SpiDeviceError::Cs)?; | 150 | self.cs.set_low().map_err(SpiDeviceError::Cs)?; |
| @@ -149,12 +157,12 @@ where | |||
| 149 | Operation::Transfer(read, write) => bus.transfer(read, write).await, | 157 | Operation::Transfer(read, write) => bus.transfer(read, write).await, |
| 150 | Operation::TransferInPlace(buf) => bus.transfer_in_place(buf).await, | 158 | Operation::TransferInPlace(buf) => bus.transfer_in_place(buf).await, |
| 151 | #[cfg(not(feature = "time"))] | 159 | #[cfg(not(feature = "time"))] |
| 152 | Operation::DelayUs(us) => return Err(SpiDeviceError::DelayUsNotSupported), | 160 | Operation::DelayNs(_) => unreachable!(), |
| 153 | #[cfg(feature = "time")] | 161 | #[cfg(feature = "time")] |
| 154 | Operation::DelayUs(us) => match bus.flush().await { | 162 | Operation::DelayNs(ns) => match bus.flush().await { |
| 155 | Err(e) => Err(e), | 163 | Err(e) => Err(e), |
| 156 | Ok(()) => { | 164 | Ok(()) => { |
| 157 | embassy_time::Timer::after_micros(*us as _).await; | 165 | embassy_time::Timer::after_nanos(*ns as _).await; |
| 158 | Ok(()) | 166 | Ok(()) |
| 159 | } | 167 | } |
| 160 | }, | 168 | }, |
diff --git a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs index 2b67862ea..59b65bfbd 100644 --- a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs +++ b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs | |||
| @@ -55,8 +55,8 @@ where | |||
| 55 | CS: OutputPin, | 55 | CS: OutputPin, |
| 56 | { | 56 | { |
| 57 | fn transaction(&mut self, operations: &mut [Operation<'_, u8>]) -> Result<(), Self::Error> { | 57 | fn transaction(&mut self, operations: &mut [Operation<'_, u8>]) -> Result<(), Self::Error> { |
| 58 | if cfg!(not(feature = "time")) && operations.iter().any(|op| matches!(op, Operation::DelayUs(_))) { | 58 | if cfg!(not(feature = "time")) && operations.iter().any(|op| matches!(op, Operation::DelayNs(_))) { |
| 59 | return Err(SpiDeviceError::DelayUsNotSupported); | 59 | return Err(SpiDeviceError::DelayNotSupported); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | self.bus.lock(|bus| { | 62 | self.bus.lock(|bus| { |
| @@ -69,10 +69,10 @@ where | |||
| 69 | Operation::Transfer(read, write) => bus.transfer(read, write), | 69 | Operation::Transfer(read, write) => bus.transfer(read, write), |
| 70 | Operation::TransferInPlace(buf) => bus.transfer_in_place(buf), | 70 | Operation::TransferInPlace(buf) => bus.transfer_in_place(buf), |
| 71 | #[cfg(not(feature = "time"))] | 71 | #[cfg(not(feature = "time"))] |
| 72 | Operation::DelayUs(_) => unreachable!(), | 72 | Operation::DelayNs(_) => unreachable!(), |
| 73 | #[cfg(feature = "time")] | 73 | #[cfg(feature = "time")] |
| 74 | Operation::DelayUs(us) => { | 74 | Operation::DelayNs(ns) => { |
| 75 | embassy_time::block_for(embassy_time::Duration::from_micros(*us as _)); | 75 | embassy_time::block_for(embassy_time::Duration::from_nanos(*ns as _)); |
| 76 | Ok(()) | 76 | Ok(()) |
| 77 | } | 77 | } |
| 78 | }); | 78 | }); |
| @@ -165,8 +165,8 @@ where | |||
| 165 | CS: OutputPin, | 165 | CS: OutputPin, |
| 166 | { | 166 | { |
| 167 | fn transaction(&mut self, operations: &mut [Operation<'_, u8>]) -> Result<(), Self::Error> { | 167 | fn transaction(&mut self, operations: &mut [Operation<'_, u8>]) -> Result<(), Self::Error> { |
| 168 | if cfg!(not(feature = "time")) && operations.iter().any(|op| matches!(op, Operation::DelayUs(_))) { | 168 | if cfg!(not(feature = "time")) && operations.iter().any(|op| matches!(op, Operation::DelayNs(_))) { |
| 169 | return Err(SpiDeviceError::DelayUsNotSupported); | 169 | return Err(SpiDeviceError::DelayNotSupported); |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | self.bus.lock(|bus| { | 172 | self.bus.lock(|bus| { |
| @@ -180,10 +180,10 @@ where | |||
| 180 | Operation::Transfer(read, write) => bus.transfer(read, write), | 180 | Operation::Transfer(read, write) => bus.transfer(read, write), |
| 181 | Operation::TransferInPlace(buf) => bus.transfer_in_place(buf), | 181 | Operation::TransferInPlace(buf) => bus.transfer_in_place(buf), |
| 182 | #[cfg(not(feature = "time"))] | 182 | #[cfg(not(feature = "time"))] |
| 183 | Operation::DelayUs(_) => unreachable!(), | 183 | Operation::DelayNs(_) => unreachable!(), |
| 184 | #[cfg(feature = "time")] | 184 | #[cfg(feature = "time")] |
| 185 | Operation::DelayUs(us) => { | 185 | Operation::DelayNs(ns) => { |
| 186 | embassy_time::block_for(embassy_time::Duration::from_micros(*us as _)); | 186 | embassy_time::block_for(embassy_time::Duration::from_nanos(*ns as _)); |
| 187 | Ok(()) | 187 | Ok(()) |
| 188 | } | 188 | } |
| 189 | }); | 189 | }); |
diff --git a/embassy-embedded-hal/src/shared_bus/mod.rs b/embassy-embedded-hal/src/shared_bus/mod.rs index b0159ac09..ab96df134 100644 --- a/embassy-embedded-hal/src/shared_bus/mod.rs +++ b/embassy-embedded-hal/src/shared_bus/mod.rs | |||
| @@ -39,8 +39,8 @@ pub enum SpiDeviceError<BUS, CS> { | |||
| 39 | Spi(BUS), | 39 | Spi(BUS), |
| 40 | /// Setting the value of the Chip Select (CS) pin failed. | 40 | /// Setting the value of the Chip Select (CS) pin failed. |
| 41 | Cs(CS), | 41 | Cs(CS), |
| 42 | /// DelayUs operations are not supported when the `time` Cargo feature is not enabled. | 42 | /// Delay operations are not supported when the `time` Cargo feature is not enabled. |
| 43 | DelayUsNotSupported, | 43 | DelayNotSupported, |
| 44 | /// The SPI bus could not be configured. | 44 | /// The SPI bus could not be configured. |
| 45 | Config, | 45 | Config, |
| 46 | } | 46 | } |
| @@ -54,7 +54,7 @@ where | |||
| 54 | match self { | 54 | match self { |
| 55 | Self::Spi(e) => e.kind(), | 55 | Self::Spi(e) => e.kind(), |
| 56 | Self::Cs(_) => spi::ErrorKind::Other, | 56 | Self::Cs(_) => spi::ErrorKind::Other, |
| 57 | Self::DelayUsNotSupported => spi::ErrorKind::Other, | 57 | Self::DelayNotSupported => spi::ErrorKind::Other, |
| 58 | Self::Config => spi::ErrorKind::Other, | 58 | Self::Config => spi::ErrorKind::Other, |
| 59 | } | 59 | } |
| 60 | } | 60 | } |
diff --git a/embassy-net-adin1110/Cargo.toml b/embassy-net-adin1110/Cargo.toml index 3f016160d..3dbbee44d 100644 --- a/embassy-net-adin1110/Cargo.toml +++ b/embassy-net-adin1110/Cargo.toml | |||
| @@ -13,16 +13,16 @@ edition = "2021" | |||
| 13 | heapless = "0.8" | 13 | heapless = "0.8" |
| 14 | defmt = { version = "0.3", optional = true } | 14 | defmt = { version = "0.3", optional = true } |
| 15 | log = { version = "0.4", default-features = false, optional = true } | 15 | log = { version = "0.4", default-features = false, optional = true } |
| 16 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" } | 16 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } |
| 17 | embedded-hal-async = { version = "=1.0.0-rc.1" } | 17 | embedded-hal-async = { version = "=1.0.0-rc.2" } |
| 18 | embedded-hal-bus = { version = "=0.1.0-rc.1", features = ["async"] } | 18 | embedded-hal-bus = { version = "=0.1.0-rc.2", features = ["async"] } |
| 19 | embassy-net-driver-channel = { version = "0.2.0", path = "../embassy-net-driver-channel" } | 19 | embassy-net-driver-channel = { version = "0.2.0", path = "../embassy-net-driver-channel" } |
| 20 | embassy-time = { version = "0.1.5", path = "../embassy-time" } | 20 | embassy-time = { version = "0.1.5", path = "../embassy-time" } |
| 21 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 21 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 22 | bitfield = "0.14.0" | 22 | bitfield = "0.14.0" |
| 23 | 23 | ||
| 24 | [dev-dependencies] | 24 | [dev-dependencies] |
| 25 | embedded-hal-mock = { version = "=0.10.0-rc.1", features = ["embedded-hal-async", "eh1"] } | 25 | embedded-hal-mock = { git = "https://github.com/Dirbaio/embedded-hal-mock", rev = "c5c4dca18e043e6386aee02173f61a65fea3981e", features = ["embedded-hal-async", "eh1"] } |
| 26 | crc = "3.0.1" | 26 | crc = "3.0.1" |
| 27 | env_logger = "0.10" | 27 | env_logger = "0.10" |
| 28 | critical-section = { version = "1.1.2", features = ["std"] } | 28 | critical-section = { version = "1.1.2", features = ["std"] } |
diff --git a/embassy-net-adin1110/src/lib.rs b/embassy-net-adin1110/src/lib.rs index 331c596df..e4a3cb209 100644 --- a/embassy-net-adin1110/src/lib.rs +++ b/embassy-net-adin1110/src/lib.rs | |||
| @@ -729,7 +729,7 @@ mod tests { | |||
| 729 | use core::convert::Infallible; | 729 | use core::convert::Infallible; |
| 730 | 730 | ||
| 731 | use embedded_hal_1::digital::{ErrorType, OutputPin}; | 731 | use embedded_hal_1::digital::{ErrorType, OutputPin}; |
| 732 | use embedded_hal_async::delay::DelayUs; | 732 | use embedded_hal_async::delay::DelayNs; |
| 733 | use embedded_hal_bus::spi::ExclusiveDevice; | 733 | use embedded_hal_bus::spi::ExclusiveDevice; |
| 734 | use embedded_hal_mock::common::Generic; | 734 | use embedded_hal_mock::common::Generic; |
| 735 | use embedded_hal_mock::eh1::spi::{Mock as SpiMock, Transaction as SpiTransaction}; | 735 | use embedded_hal_mock::eh1::spi::{Mock as SpiMock, Transaction as SpiTransaction}; |
| @@ -760,7 +760,11 @@ mod tests { | |||
| 760 | // see https://github.com/rust-embedded/embedded-hal/pull/462#issuecomment-1560014426 | 760 | // see https://github.com/rust-embedded/embedded-hal/pull/462#issuecomment-1560014426 |
| 761 | struct MockDelay {} | 761 | struct MockDelay {} |
| 762 | 762 | ||
| 763 | impl DelayUs for MockDelay { | 763 | impl DelayNs for MockDelay { |
| 764 | async fn delay_ns(&mut self, _ns: u32) { | ||
| 765 | todo!() | ||
| 766 | } | ||
| 767 | |||
| 764 | async fn delay_us(&mut self, _us: u32) { | 768 | async fn delay_us(&mut self, _us: u32) { |
| 765 | todo!() | 769 | todo!() |
| 766 | } | 770 | } |
diff --git a/embassy-net-enc28j60/Cargo.toml b/embassy-net-enc28j60/Cargo.toml index ea2ed1f77..eda699d9f 100644 --- a/embassy-net-enc28j60/Cargo.toml +++ b/embassy-net-enc28j60/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | edition = "2021" | 8 | edition = "2021" |
| 9 | 9 | ||
| 10 | [dependencies] | 10 | [dependencies] |
| 11 | embedded-hal = { version = "1.0.0-rc.1" } | 11 | embedded-hal = { version = "1.0.0-rc.2" } |
| 12 | embedded-hal-async = { version = "=1.0.0-rc.1" } | 12 | embedded-hal-async = { version = "=1.0.0-rc.2" } |
| 13 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } | 13 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } |
| 14 | embassy-time = { version = "0.1.5", path = "../embassy-time" } | 14 | embassy-time = { version = "0.1.5", path = "../embassy-time" } |
| 15 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 15 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
diff --git a/embassy-net-esp-hosted/Cargo.toml b/embassy-net-esp-hosted/Cargo.toml index e86be4455..6b325c806 100644 --- a/embassy-net-esp-hosted/Cargo.toml +++ b/embassy-net-esp-hosted/Cargo.toml | |||
| @@ -12,8 +12,8 @@ embassy-sync = { version = "0.4.0", path = "../embassy-sync"} | |||
| 12 | embassy-futures = { version = "0.1.0", path = "../embassy-futures"} | 12 | embassy-futures = { version = "0.1.0", path = "../embassy-futures"} |
| 13 | embassy-net-driver-channel = { version = "0.2.0", path = "../embassy-net-driver-channel"} | 13 | embassy-net-driver-channel = { version = "0.2.0", path = "../embassy-net-driver-channel"} |
| 14 | 14 | ||
| 15 | embedded-hal = { version = "1.0.0-rc.1" } | 15 | embedded-hal = { version = "1.0.0-rc.2" } |
| 16 | embedded-hal-async = { version = "=1.0.0-rc.1" } | 16 | embedded-hal-async = { version = "=1.0.0-rc.2" } |
| 17 | 17 | ||
| 18 | noproto = { git="https://github.com/embassy-rs/noproto", rev = "f5e6d1f325b6ad4e344f60452b09576e24671f62", default-features = false, features = ["derive"] } | 18 | noproto = { git="https://github.com/embassy-rs/noproto", rev = "f5e6d1f325b6ad4e344f60452b09576e24671f62", default-features = false, features = ["derive"] } |
| 19 | #noproto = { version = "0.1", path = "/home/dirbaio/noproto", default-features = false, features = ["derive"] } | 19 | #noproto = { version = "0.1", path = "/home/dirbaio/noproto", default-features = false, features = ["derive"] } |
diff --git a/embassy-net-ppp/Cargo.toml b/embassy-net-ppp/Cargo.toml index 273dccbc2..7119ebd57 100644 --- a/embassy-net-ppp/Cargo.toml +++ b/embassy-net-ppp/Cargo.toml | |||
| @@ -15,7 +15,7 @@ log = ["dep:log", "ppproto/log"] | |||
| 15 | defmt = { version = "0.3", optional = true } | 15 | defmt = { version = "0.3", optional = true } |
| 16 | log = { version = "0.4.14", optional = true } | 16 | log = { version = "0.4.14", optional = true } |
| 17 | 17 | ||
| 18 | embedded-io-async = { version = "0.6.0" } | 18 | embedded-io-async = { version = "0.6.1" } |
| 19 | embassy-net-driver-channel = { version = "0.2.0", path = "../embassy-net-driver-channel" } | 19 | embassy-net-driver-channel = { version = "0.2.0", path = "../embassy-net-driver-channel" } |
| 20 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 20 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 21 | ppproto = { version = "0.1.2"} | 21 | ppproto = { version = "0.1.2"} |
diff --git a/embassy-net-wiznet/Cargo.toml b/embassy-net-wiznet/Cargo.toml index 0cc086b7e..187f3e299 100644 --- a/embassy-net-wiznet/Cargo.toml +++ b/embassy-net-wiznet/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | edition = "2021" | 8 | edition = "2021" |
| 9 | 9 | ||
| 10 | [dependencies] | 10 | [dependencies] |
| 11 | embedded-hal = { version = "1.0.0-rc.1" } | 11 | embedded-hal = { version = "1.0.0-rc.2" } |
| 12 | embedded-hal-async = { version = "=1.0.0-rc.1" } | 12 | embedded-hal-async = { version = "=1.0.0-rc.2" } |
| 13 | embassy-net-driver-channel = { version = "0.2.0", path = "../embassy-net-driver-channel" } | 13 | embassy-net-driver-channel = { version = "0.2.0", path = "../embassy-net-driver-channel" } |
| 14 | embassy-time = { version = "0.1.5", path = "../embassy-time" } | 14 | embassy-time = { version = "0.1.5", path = "../embassy-time" } |
| 15 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 15 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index ef66078cb..fe8344f5b 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml | |||
| @@ -54,7 +54,7 @@ smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp.git", rev = "b57e2f9e70 | |||
| 54 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } | 54 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } |
| 55 | embassy-time = { version = "0.1.5", path = "../embassy-time" } | 55 | embassy-time = { version = "0.1.5", path = "../embassy-time" } |
| 56 | embassy-sync = { version = "0.4.0", path = "../embassy-sync" } | 56 | embassy-sync = { version = "0.4.0", path = "../embassy-sync" } |
| 57 | embedded-io-async = { version = "0.6.0", optional = true } | 57 | embedded-io-async = { version = "0.6.1", optional = true } |
| 58 | 58 | ||
| 59 | managed = { version = "0.8.0", default-features = false, features = [ "map" ] } | 59 | managed = { version = "0.8.0", default-features = false, features = [ "map" ] } |
| 60 | heapless = { version = "0.8", default-features = false } | 60 | heapless = { version = "0.8", default-features = false } |
| @@ -63,4 +63,4 @@ generic-array = { version = "0.14.4", default-features = false } | |||
| 63 | stable_deref_trait = { version = "1.2.0", default-features = false } | 63 | stable_deref_trait = { version = "1.2.0", default-features = false } |
| 64 | futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } | 64 | futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } |
| 65 | atomic-pool = "1.0" | 65 | atomic-pool = "1.0" |
| 66 | embedded-nal-async = { version = "0.7", optional = true } | 66 | embedded-nal-async = { version = "0.7.1", optional = true } |
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 60e03d859..a75a94f02 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -101,10 +101,10 @@ embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } | |||
| 101 | embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional=true } | 101 | embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional=true } |
| 102 | 102 | ||
| 103 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } | 103 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } |
| 104 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1", optional = true} | 104 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2", optional = true} |
| 105 | embedded-hal-async = { version = "=1.0.0-rc.1", optional = true} | 105 | embedded-hal-async = { version = "=1.0.0-rc.2", optional = true} |
| 106 | embedded-io = { version = "0.6.0" } | 106 | embedded-io = { version = "0.6.0" } |
| 107 | embedded-io-async = { version = "0.6.0", optional = true } | 107 | embedded-io-async = { version = "0.6.1", optional = true } |
| 108 | 108 | ||
| 109 | defmt = { version = "0.3", optional = true } | 109 | defmt = { version = "0.3", optional = true } |
| 110 | log = { version = "0.4.14", optional = true } | 110 | log = { version = "0.4.14", optional = true } |
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index eb79cfd35..35ea77f03 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml | |||
| @@ -76,7 +76,7 @@ critical-section = "1.1" | |||
| 76 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 76 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 77 | chrono = { version = "0.4", default-features = false, optional = true } | 77 | chrono = { version = "0.4", default-features = false, optional = true } |
| 78 | embedded-io = { version = "0.6.0" } | 78 | embedded-io = { version = "0.6.0" } |
| 79 | embedded-io-async = { version = "0.6.0", optional = true } | 79 | embedded-io-async = { version = "0.6.1", optional = true } |
| 80 | embedded-storage = { version = "0.3" } | 80 | embedded-storage = { version = "0.3" } |
| 81 | embedded-storage-async = { version = "0.4.0", optional = true } | 81 | embedded-storage-async = { version = "0.4.0", optional = true } |
| 82 | rand_core = "0.6.4" | 82 | rand_core = "0.6.4" |
| @@ -85,9 +85,9 @@ fixed = "1.23.1" | |||
| 85 | rp-pac = { version = "6" } | 85 | rp-pac = { version = "6" } |
| 86 | 86 | ||
| 87 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } | 87 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } |
| 88 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1", optional = true} | 88 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2", optional = true} |
| 89 | embedded-hal-async = { version = "=1.0.0-rc.1", optional = true} | 89 | embedded-hal-async = { version = "=1.0.0-rc.2", optional = true} |
| 90 | embedded-hal-nb = { version = "=1.0.0-rc.1", optional = true} | 90 | embedded-hal-nb = { version = "=1.0.0-rc.2", optional = true} |
| 91 | 91 | ||
| 92 | pio-proc = {version= "0.2" } | 92 | pio-proc = {version= "0.2" } |
| 93 | pio = {version= "0.2.1" } | 93 | pio = {version= "0.2.1" } |
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 292902ac7..535357fcc 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml | |||
| @@ -42,9 +42,9 @@ embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optiona | |||
| 42 | embassy-executor = { version = "0.3.3", path = "../embassy-executor", optional = true } | 42 | embassy-executor = { version = "0.3.3", path = "../embassy-executor", optional = true } |
| 43 | 43 | ||
| 44 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } | 44 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } |
| 45 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1", optional = true} | 45 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2", optional = true} |
| 46 | embedded-hal-async = { version = "=1.0.0-rc.1", optional = true} | 46 | embedded-hal-async = { version = "=1.0.0-rc.2", optional = true} |
| 47 | embedded-hal-nb = { version = "=1.0.0-rc.1", optional = true} | 47 | embedded-hal-nb = { version = "=1.0.0-rc.2", optional = true} |
| 48 | 48 | ||
| 49 | embedded-storage = "0.3.0" | 49 | embedded-storage = "0.3.0" |
| 50 | embedded-storage-async = { version = "0.4.0", optional = true } | 50 | embedded-storage-async = { version = "0.4.0", optional = true } |
| @@ -65,7 +65,7 @@ nb = "1.0.0" | |||
| 65 | stm32-fmc = "0.3.0" | 65 | stm32-fmc = "0.3.0" |
| 66 | cfg-if = "1.0.0" | 66 | cfg-if = "1.0.0" |
| 67 | embedded-io = { version = "0.6.0" } | 67 | embedded-io = { version = "0.6.0" } |
| 68 | embedded-io-async = { version = "0.6.0", optional = true } | 68 | embedded-io-async = { version = "0.6.1", optional = true } |
| 69 | chrono = { version = "^0.4", default-features = false, optional = true} | 69 | chrono = { version = "^0.4", default-features = false, optional = true} |
| 70 | bit_field = "0.10.2" | 70 | bit_field = "0.10.2" |
| 71 | document-features = "0.2.7" | 71 | document-features = "0.2.7" |
diff --git a/embassy-sync/Cargo.toml b/embassy-sync/Cargo.toml index e395389aa..ffcd13d9f 100644 --- a/embassy-sync/Cargo.toml +++ b/embassy-sync/Cargo.toml | |||
| @@ -35,7 +35,7 @@ futures-util = { version = "0.3.17", default-features = false } | |||
| 35 | critical-section = "1.1" | 35 | critical-section = "1.1" |
| 36 | heapless = "0.8" | 36 | heapless = "0.8" |
| 37 | cfg-if = "1.0.0" | 37 | cfg-if = "1.0.0" |
| 38 | embedded-io-async = { version = "0.6.0", optional = true } | 38 | embedded-io-async = { version = "0.6.1", optional = true } |
| 39 | 39 | ||
| 40 | [dev-dependencies] | 40 | [dev-dependencies] |
| 41 | futures-executor = { version = "0.3.17", features = [ "thread-pool" ] } | 41 | futures-executor = { version = "0.3.17", features = [ "thread-pool" ] } |
diff --git a/embassy-time/CHANGELOG.md b/embassy-time/CHANGELOG.md index 1421d76a9..9625b8909 100644 --- a/embassy-time/CHANGELOG.md +++ b/embassy-time/CHANGELOG.md | |||
| @@ -22,8 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 22 | 22 | ||
| 23 | ## 0.1.3 - 2023-08-28 | 23 | ## 0.1.3 - 2023-08-28 |
| 24 | 24 | ||
| 25 | - Update `embedded-hal-async` to `1.0.0-rc.1` | 25 | - Update `embedded-hal-async` to `1.0.0-rc.2` |
| 26 | - Update `embedded-hal v1` to `1.0.0-rc.1` | 26 | - Update `embedded-hal v1` to `1.0.0-rc.2` |
| 27 | 27 | ||
| 28 | ## 0.1.2 - 2023-07-05 | 28 | ## 0.1.2 - 2023-07-05 |
| 29 | 29 | ||
diff --git a/embassy-time/Cargo.toml b/embassy-time/Cargo.toml index 3cabb2371..570e0efa7 100644 --- a/embassy-time/Cargo.toml +++ b/embassy-time/Cargo.toml | |||
| @@ -242,8 +242,8 @@ defmt = { version = "0.3", optional = true } | |||
| 242 | log = { version = "0.4.14", optional = true } | 242 | log = { version = "0.4.14", optional = true } |
| 243 | 243 | ||
| 244 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6" } | 244 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6" } |
| 245 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1", optional = true} | 245 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2", optional = true} |
| 246 | embedded-hal-async = { version = "=1.0.0-rc.1", optional = true} | 246 | embedded-hal-async = { version = "=1.0.0-rc.2", optional = true} |
| 247 | 247 | ||
| 248 | futures-util = { version = "0.3.17", default-features = false } | 248 | futures-util = { version = "0.3.17", default-features = false } |
| 249 | critical-section = "1.1" | 249 | critical-section = "1.1" |
diff --git a/embassy-time/src/delay.rs b/embassy-time/src/delay.rs index be962747c..aab56b1f1 100644 --- a/embassy-time/src/delay.rs +++ b/embassy-time/src/delay.rs | |||
| @@ -18,7 +18,11 @@ pub struct Delay; | |||
| 18 | mod eh1 { | 18 | mod eh1 { |
| 19 | use super::*; | 19 | use super::*; |
| 20 | 20 | ||
| 21 | impl embedded_hal_1::delay::DelayUs for Delay { | 21 | impl embedded_hal_1::delay::DelayNs for Delay { |
| 22 | fn delay_ns(&mut self, ns: u32) { | ||
| 23 | block_for(Duration::from_nanos(ns as u64)) | ||
| 24 | } | ||
| 25 | |||
| 22 | fn delay_us(&mut self, us: u32) { | 26 | fn delay_us(&mut self, us: u32) { |
| 23 | block_for(Duration::from_micros(us as u64)) | 27 | block_for(Duration::from_micros(us as u64)) |
| 24 | } | 28 | } |
| @@ -34,13 +38,17 @@ mod eha { | |||
| 34 | use super::*; | 38 | use super::*; |
| 35 | use crate::Timer; | 39 | use crate::Timer; |
| 36 | 40 | ||
| 37 | impl embedded_hal_async::delay::DelayUs for Delay { | 41 | impl embedded_hal_async::delay::DelayNs for Delay { |
| 38 | async fn delay_us(&mut self, micros: u32) { | 42 | async fn delay_ns(&mut self, ns: u32) { |
| 39 | Timer::after_micros(micros as _).await | 43 | Timer::after_nanos(ns as _).await |
| 44 | } | ||
| 45 | |||
| 46 | async fn delay_us(&mut self, us: u32) { | ||
| 47 | Timer::after_micros(us as _).await | ||
| 40 | } | 48 | } |
| 41 | 49 | ||
| 42 | async fn delay_ms(&mut self, millis: u32) { | 50 | async fn delay_ms(&mut self, ms: u32) { |
| 43 | Timer::after_millis(millis as _).await | 51 | Timer::after_millis(ms as _).await |
| 44 | } | 52 | } |
| 45 | } | 53 | } |
| 46 | } | 54 | } |
diff --git a/embassy-time/src/duration.rs b/embassy-time/src/duration.rs index 8366455be..647d208e3 100644 --- a/embassy-time/src/duration.rs +++ b/embassy-time/src/duration.rs | |||
| @@ -2,6 +2,7 @@ use core::fmt; | |||
| 2 | use core::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign}; | 2 | use core::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign}; |
| 3 | 3 | ||
| 4 | use super::{GCD_1K, GCD_1M, TICK_HZ}; | 4 | use super::{GCD_1K, GCD_1M, TICK_HZ}; |
| 5 | use crate::GCD_1G; | ||
| 5 | 6 | ||
| 6 | #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] | 7 | #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] |
| 7 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 8 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| @@ -61,6 +62,14 @@ impl Duration { | |||
| 61 | } | 62 | } |
| 62 | } | 63 | } |
| 63 | 64 | ||
| 65 | /// Creates a duration from the specified number of nanoseconds, rounding up. | ||
| 66 | /// NOTE: Delays this small may be inaccurate. | ||
| 67 | pub const fn from_nanos(micros: u64) -> Duration { | ||
| 68 | Duration { | ||
| 69 | ticks: div_ceil(micros * (TICK_HZ / GCD_1G), 1_000_000_000 / GCD_1G), | ||
| 70 | } | ||
| 71 | } | ||
| 72 | |||
| 64 | /// Creates a duration from the specified number of seconds, rounding down. | 73 | /// Creates a duration from the specified number of seconds, rounding down. |
| 65 | pub const fn from_secs_floor(secs: u64) -> Duration { | 74 | pub const fn from_secs_floor(secs: u64) -> Duration { |
| 66 | Duration { ticks: secs * TICK_HZ } | 75 | Duration { ticks: secs * TICK_HZ } |
diff --git a/embassy-time/src/lib.rs b/embassy-time/src/lib.rs index a90368d59..a0f6e3824 100644 --- a/embassy-time/src/lib.rs +++ b/embassy-time/src/lib.rs | |||
| @@ -52,6 +52,7 @@ const fn gcd(a: u64, b: u64) -> u64 { | |||
| 52 | 52 | ||
| 53 | pub(crate) const GCD_1K: u64 = gcd(TICK_HZ, 1_000); | 53 | pub(crate) const GCD_1K: u64 = gcd(TICK_HZ, 1_000); |
| 54 | pub(crate) const GCD_1M: u64 = gcd(TICK_HZ, 1_000_000); | 54 | pub(crate) const GCD_1M: u64 = gcd(TICK_HZ, 1_000_000); |
| 55 | pub(crate) const GCD_1G: u64 = gcd(TICK_HZ, 1_000_000_000); | ||
| 55 | 56 | ||
| 56 | #[cfg(feature = "defmt-timestamp-uptime")] | 57 | #[cfg(feature = "defmt-timestamp-uptime")] |
| 57 | defmt::timestamp! {"{=u64:us}", Instant::now().as_micros() } | 58 | defmt::timestamp! {"{=u64:us}", Instant::now().as_micros() } |
diff --git a/embassy-time/src/timer.rs b/embassy-time/src/timer.rs index ee2423daf..574d715da 100644 --- a/embassy-time/src/timer.rs +++ b/embassy-time/src/timer.rs | |||
| @@ -74,6 +74,15 @@ impl Timer { | |||
| 74 | Self::after(Duration::from_ticks(ticks)) | 74 | Self::after(Duration::from_ticks(ticks)) |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | /// Expire after the specified number of nanoseconds. | ||
| 78 | /// | ||
| 79 | /// This method is a convenience wrapper for calling `Timer::after(Duration::from_nanos())`. | ||
| 80 | /// For more details, refer to [`Timer::after()`] and [`Duration::from_nanos()`]. | ||
| 81 | #[inline] | ||
| 82 | pub fn after_nanos(nanos: u64) -> Self { | ||
| 83 | Self::after(Duration::from_nanos(nanos)) | ||
| 84 | } | ||
| 85 | |||
| 77 | /// Expire after the specified number of microseconds. | 86 | /// Expire after the specified number of microseconds. |
| 78 | /// | 87 | /// |
| 79 | /// This method is a convenience wrapper for calling `Timer::after(Duration::from_micros())`. | 88 | /// This method is a convenience wrapper for calling `Timer::after(Duration::from_micros())`. |
diff --git a/examples/nrf52840/Cargo.toml b/examples/nrf52840/Cargo.toml index 88e8d58d1..d9b22a4d2 100644 --- a/examples/nrf52840/Cargo.toml +++ b/examples/nrf52840/Cargo.toml | |||
| @@ -32,7 +32,7 @@ embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defm | |||
| 32 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"], optional = true } | 32 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"], optional = true } |
| 33 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"], optional = true } | 33 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"], optional = true } |
| 34 | embedded-io = { version = "0.6.0", features = ["defmt-03"] } | 34 | embedded-io = { version = "0.6.0", features = ["defmt-03"] } |
| 35 | embedded-io-async = { version = "0.6.0", optional = true, features = ["defmt-03"] } | 35 | embedded-io-async = { version = "0.6.1", optional = true, features = ["defmt-03"] } |
| 36 | embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"], optional = true } | 36 | embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"], optional = true } |
| 37 | embassy-net-enc28j60 = { version = "0.1.0", path = "../../embassy-net-enc28j60", features = ["defmt"], optional = true } | 37 | embassy-net-enc28j60 = { version = "0.1.0", path = "../../embassy-net-enc28j60", features = ["defmt"], optional = true } |
| 38 | 38 | ||
| @@ -49,9 +49,9 @@ rand = { version = "0.8.4", default-features = false } | |||
| 49 | embedded-storage = "0.3.0" | 49 | embedded-storage = "0.3.0" |
| 50 | usbd-hid = "0.6.0" | 50 | usbd-hid = "0.6.0" |
| 51 | serde = { version = "1.0.136", default-features = false } | 51 | serde = { version = "1.0.136", default-features = false } |
| 52 | embedded-hal = { version = "1.0.0-rc.1" } | 52 | embedded-hal = { version = "1.0.0-rc.2" } |
| 53 | embedded-hal-async = { version = "1.0.0-rc.1", optional = true } | 53 | embedded-hal-async = { version = "1.0.0-rc.2", optional = true } |
| 54 | embedded-hal-bus = { version = "0.1.0-rc.1" } | 54 | embedded-hal-bus = { version = "0.1.0-rc.2" } |
| 55 | num-integer = { version = "0.1.45", default-features = false } | 55 | num-integer = { version = "0.1.45", default-features = false } |
| 56 | microfft = "0.5.0" | 56 | microfft = "0.5.0" |
| 57 | 57 | ||
diff --git a/examples/nrf5340/Cargo.toml b/examples/nrf5340/Cargo.toml index 032ec9806..25ae97496 100644 --- a/examples/nrf5340/Cargo.toml +++ b/examples/nrf5340/Cargo.toml | |||
| @@ -37,7 +37,7 @@ embassy-net = { version = "0.2.0", path = "../../embassy-net", features = [ | |||
| 37 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = [ | 37 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = [ |
| 38 | "defmt", | 38 | "defmt", |
| 39 | ] } | 39 | ] } |
| 40 | embedded-io-async = { version = "0.6.0" } | 40 | embedded-io-async = { version = "0.6.1" } |
| 41 | 41 | ||
| 42 | defmt = "0.3" | 42 | defmt = "0.3" |
| 43 | defmt-rtt = "0.4" | 43 | defmt-rtt = "0.4" |
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index 1012a8b5f..e0e0d8a78 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -38,10 +38,10 @@ smart-leds = "0.3.0" | |||
| 38 | heapless = "0.8" | 38 | heapless = "0.8" |
| 39 | usbd-hid = "0.6.1" | 39 | usbd-hid = "0.6.1" |
| 40 | 40 | ||
| 41 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" } | 41 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } |
| 42 | embedded-hal-async = "1.0.0-rc.1" | 42 | embedded-hal-async = "1.0.0-rc.2" |
| 43 | embedded-hal-bus = { version = "0.1.0-rc.1", features = ["async"] } | 43 | embedded-hal-bus = { version = "0.1.0-rc.2", features = ["async"] } |
| 44 | embedded-io-async = { version = "0.6.0", features = ["defmt-03"] } | 44 | embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } |
| 45 | embedded-storage = { version = "0.3" } | 45 | embedded-storage = { version = "0.3" } |
| 46 | static_cell = { version = "2", features = ["nightly"]} | 46 | static_cell = { version = "2", features = ["nightly"]} |
| 47 | portable-atomic = { version = "1.5", features = ["critical-section"] } | 47 | portable-atomic = { version = "1.5", features = ["critical-section"] } |
diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml index 75ed74b57..2a59fd693 100644 --- a/examples/std/Cargo.toml +++ b/examples/std/Cargo.toml | |||
| @@ -11,8 +11,8 @@ embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["lo | |||
| 11 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "medium-ip", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] } | 11 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "medium-ip", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] } |
| 12 | embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" } | 12 | embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" } |
| 13 | embassy-net-ppp = { version = "0.1.0", path = "../../embassy-net-ppp", features = ["log"]} | 13 | embassy-net-ppp = { version = "0.1.0", path = "../../embassy-net-ppp", features = ["log"]} |
| 14 | embedded-io-async = { version = "0.6.0" } | 14 | embedded-io-async = { version = "0.6.1" } |
| 15 | embedded-io-adapters = { version = "0.6.0", features = ["futures-03"] } | 15 | embedded-io-adapters = { version = "0.6.1", features = ["futures-03"] } |
| 16 | critical-section = { version = "1.1", features = ["std"] } | 16 | critical-section = { version = "1.1", features = ["std"] } |
| 17 | 17 | ||
| 18 | async-io = "1.6.0" | 18 | async-io = "1.6.0" |
diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml index 772d873c7..8cee6d231 100644 --- a/examples/stm32f4/Cargo.toml +++ b/examples/stm32f4/Cargo.toml | |||
| @@ -20,7 +20,7 @@ cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-sing | |||
| 20 | cortex-m-rt = "0.7.0" | 20 | cortex-m-rt = "0.7.0" |
| 21 | embedded-hal = "0.2.6" | 21 | embedded-hal = "0.2.6" |
| 22 | embedded-io = { version = "0.6.0" } | 22 | embedded-io = { version = "0.6.0" } |
| 23 | embedded-io-async = { version = "0.6.0" } | 23 | embedded-io-async = { version = "0.6.1" } |
| 24 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 24 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 25 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 25 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 26 | heapless = { version = "0.8", default-features = false } | 26 | heapless = { version = "0.8", default-features = false } |
diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml index d418f8132..8fe2f2892 100644 --- a/examples/stm32f7/Cargo.toml +++ b/examples/stm32f7/Cargo.toml | |||
| @@ -11,7 +11,7 @@ embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["de | |||
| 11 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 12 | embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] } | 13 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] } |
| 14 | embedded-io-async = { version = "0.6.0" } | 14 | embedded-io-async = { version = "0.6.1" } |
| 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "0.3" |
diff --git a/examples/stm32h5/Cargo.toml b/examples/stm32h5/Cargo.toml index e8d17cee0..db34005a0 100644 --- a/examples/stm32h5/Cargo.toml +++ b/examples/stm32h5/Cargo.toml | |||
| @@ -11,7 +11,7 @@ embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["de | |||
| 11 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 12 | embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } |
| 13 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] } | 13 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] } |
| 14 | embedded-io-async = { version = "0.6.0" } | 14 | embedded-io-async = { version = "0.6.1" } |
| 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "0.3" |
| @@ -20,9 +20,9 @@ defmt-rtt = "0.4" | |||
| 20 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 20 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 21 | cortex-m-rt = "0.7.0" | 21 | cortex-m-rt = "0.7.0" |
| 22 | embedded-hal = "0.2.6" | 22 | embedded-hal = "0.2.6" |
| 23 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" } | 23 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } |
| 24 | embedded-hal-async = { version = "=1.0.0-rc.1" } | 24 | embedded-hal-async = { version = "=1.0.0-rc.2" } |
| 25 | embedded-nal-async = { version = "0.7" } | 25 | embedded-nal-async = { version = "0.7.1" } |
| 26 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 26 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 27 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 27 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 28 | heapless = { version = "0.8", default-features = false } | 28 | heapless = { version = "0.8", default-features = false } |
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index 05523d00c..2fe88dfaf 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml | |||
| @@ -11,7 +11,7 @@ embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["de | |||
| 11 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 12 | embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } |
| 13 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } | 13 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } |
| 14 | embedded-io-async = { version = "0.6.0" } | 14 | embedded-io-async = { version = "0.6.1" } |
| 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "0.3" |
| @@ -20,9 +20,9 @@ defmt-rtt = "0.4" | |||
| 20 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 20 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 21 | cortex-m-rt = "0.7.0" | 21 | cortex-m-rt = "0.7.0" |
| 22 | embedded-hal = "0.2.6" | 22 | embedded-hal = "0.2.6" |
| 23 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" } | 23 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } |
| 24 | embedded-hal-async = { version = "=1.0.0-rc.1" } | 24 | embedded-hal-async = { version = "=1.0.0-rc.2" } |
| 25 | embedded-nal-async = { version = "0.7" } | 25 | embedded-nal-async = { version = "0.7.1" } |
| 26 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 26 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 27 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 27 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 28 | heapless = { version = "0.8", default-features = false } | 28 | heapless = { version = "0.8", default-features = false } |
diff --git a/examples/stm32l0/Cargo.toml b/examples/stm32l0/Cargo.toml index 2ba58c3d0..15f7afe9c 100644 --- a/examples/stm32l0/Cargo.toml +++ b/examples/stm32l0/Cargo.toml | |||
| @@ -20,7 +20,7 @@ defmt-rtt = "0.4" | |||
| 20 | 20 | ||
| 21 | embedded-storage = "0.3.0" | 21 | embedded-storage = "0.3.0" |
| 22 | embedded-io = { version = "0.6.0" } | 22 | embedded-io = { version = "0.6.0" } |
| 23 | embedded-io-async = { version = "0.6.0", optional = true } | 23 | embedded-io-async = { version = "0.6.1", optional = true } |
| 24 | 24 | ||
| 25 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 25 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 26 | cortex-m-rt = "0.7.0" | 26 | cortex-m-rt = "0.7.0" |
diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml index f4eaf647b..350e6e260 100644 --- a/examples/stm32l4/Cargo.toml +++ b/examples/stm32l4/Cargo.toml | |||
| @@ -15,7 +15,7 @@ embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defm | |||
| 15 | embassy-net-adin1110 = { version = "0.2.0", path = "../../embassy-net-adin1110" } | 15 | embassy-net-adin1110 = { version = "0.2.0", path = "../../embassy-net-adin1110" } |
| 16 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "udp", "tcp", "dhcpv4", "medium-ethernet"] } | 16 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "udp", "tcp", "dhcpv4", "medium-ethernet"] } |
| 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 18 | embedded-io-async = { version = "0.6.0", features = ["defmt-03"] } | 18 | embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } |
| 19 | embedded-io = { version = "0.6.0", features = ["defmt-03"] } | 19 | embedded-io = { version = "0.6.0", features = ["defmt-03"] } |
| 20 | 20 | ||
| 21 | defmt = "0.3" | 21 | defmt = "0.3" |
| @@ -24,9 +24,9 @@ defmt-rtt = "0.4" | |||
| 24 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } | 24 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 25 | cortex-m-rt = "0.7.0" | 25 | cortex-m-rt = "0.7.0" |
| 26 | embedded-hal = "0.2.6" | 26 | embedded-hal = "0.2.6" |
| 27 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" } | 27 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } |
| 28 | embedded-hal-async = { version = "=1.0.0-rc.1" } | 28 | embedded-hal-async = { version = "=1.0.0-rc.2" } |
| 29 | embedded-hal-bus = { version = "=0.1.0-rc.1", features = ["async"] } | 29 | embedded-hal-bus = { version = "=0.1.0-rc.2", features = ["async"] } |
| 30 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 30 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 31 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 31 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 32 | heapless = { version = "0.8", default-features = false } | 32 | heapless = { version = "0.8", default-features = false } |
diff --git a/examples/stm32l5/Cargo.toml b/examples/stm32l5/Cargo.toml index 1b9b026ff..7bca51ad1 100644 --- a/examples/stm32l5/Cargo.toml +++ b/examples/stm32l5/Cargo.toml | |||
| @@ -25,7 +25,7 @@ embedded-hal = "0.2.6" | |||
| 25 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 25 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 26 | heapless = { version = "0.8", default-features = false } | 26 | heapless = { version = "0.8", default-features = false } |
| 27 | rand_core = { version = "0.6.3", default-features = false } | 27 | rand_core = { version = "0.6.3", default-features = false } |
| 28 | embedded-io-async = { version = "0.6.0" } | 28 | embedded-io-async = { version = "0.6.1" } |
| 29 | static_cell = { version = "2", features = ["nightly"]} | 29 | static_cell = { version = "2", features = ["nightly"]} |
| 30 | 30 | ||
| 31 | [profile.release] | 31 | [profile.release] |
diff --git a/tests/nrf/Cargo.toml b/tests/nrf/Cargo.toml index fd7568816..70bb17c14 100644 --- a/tests/nrf/Cargo.toml +++ b/tests/nrf/Cargo.toml | |||
| @@ -12,12 +12,12 @@ embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["de | |||
| 12 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "task-arena-size-16384", "integrated-timers"] } | 12 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "task-arena-size-16384", "integrated-timers"] } |
| 13 | embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "nightly", "unstable-traits", "defmt-timestamp-uptime"] } | 13 | embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "nightly", "unstable-traits", "defmt-timestamp-uptime"] } |
| 14 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } | 14 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } |
| 15 | embedded-io-async = { version = "0.6.0", features = ["defmt-03"] } | 15 | embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } |
| 16 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "nightly"] } | 16 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "nightly"] } |
| 17 | embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] } | 17 | embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] } |
| 18 | embassy-net-enc28j60 = { version = "0.1.0", path = "../../embassy-net-enc28j60", features = ["defmt"] } | 18 | embassy-net-enc28j60 = { version = "0.1.0", path = "../../embassy-net-enc28j60", features = ["defmt"] } |
| 19 | embedded-hal-async = { version = "1.0.0-rc.1" } | 19 | embedded-hal-async = { version = "1.0.0-rc.2" } |
| 20 | embedded-hal-bus = { version = "0.1.0-rc.1", features = ["async"] } | 20 | embedded-hal-bus = { version = "0.1.0-rc.2", features = ["async"] } |
| 21 | static_cell = { version = "2", features = [ "nightly" ] } | 21 | static_cell = { version = "2", features = [ "nightly" ] } |
| 22 | perf-client = { path = "../perf-client" } | 22 | perf-client = { path = "../perf-client" } |
| 23 | 23 | ||
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml index fc434a026..d69bd7952 100644 --- a/tests/rp/Cargo.toml +++ b/tests/rp/Cargo.toml | |||
| @@ -24,12 +24,12 @@ defmt-rtt = "0.4" | |||
| 24 | cortex-m = { version = "0.7.6" } | 24 | cortex-m = { version = "0.7.6" } |
| 25 | cortex-m-rt = "0.7.0" | 25 | cortex-m-rt = "0.7.0" |
| 26 | embedded-hal = "0.2.6" | 26 | embedded-hal = "0.2.6" |
| 27 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" } | 27 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } |
| 28 | embedded-hal-async = { version = "=1.0.0-rc.1" } | 28 | embedded-hal-async = { version = "=1.0.0-rc.2" } |
| 29 | embedded-hal-bus = { version = "=0.1.0-rc.1", features = ["async"] } | 29 | embedded-hal-bus = { version = "=0.1.0-rc.2", features = ["async"] } |
| 30 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } | 30 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } |
| 31 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 31 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 32 | embedded-io-async = { version = "0.6.0" } | 32 | embedded-io-async = { version = "0.6.1" } |
| 33 | embedded-storage = { version = "0.3" } | 33 | embedded-storage = { version = "0.3" } |
| 34 | static_cell = { version = "2", features = ["nightly"]} | 34 | static_cell = { version = "2", features = ["nightly"]} |
| 35 | portable-atomic = { version = "1.5", features = ["critical-section"] } | 35 | portable-atomic = { version = "1.5", features = ["critical-section"] } |
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml index 8c2cfdf5c..ba72c6421 100644 --- a/tests/stm32/Cargo.toml +++ b/tests/stm32/Cargo.toml | |||
| @@ -63,8 +63,8 @@ defmt-rtt = "0.4" | |||
| 63 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } | 63 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 64 | cortex-m-rt = "0.7.0" | 64 | cortex-m-rt = "0.7.0" |
| 65 | embedded-hal = "0.2.6" | 65 | embedded-hal = "0.2.6" |
| 66 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" } | 66 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } |
| 67 | embedded-hal-async = { version = "=1.0.0-rc.1" } | 67 | embedded-hal-async = { version = "=1.0.0-rc.2" } |
| 68 | micromath = "2.0.0" | 68 | micromath = "2.0.0" |
| 69 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } | 69 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } |
| 70 | rand_core = { version = "0.6", default-features = false } | 70 | rand_core = { version = "0.6", default-features = false } |
