diff options
| -rw-r--r-- | embassy-lora/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-nrf/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-nrf/src/uarte.rs | 2 | ||||
| -rw-r--r-- | embassy-rp/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-stm32/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-stm32/src/usart/mod.rs | 2 | ||||
| -rw-r--r-- | embassy-traits/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-traits/src/adapter.rs | 2 | ||||
| -rw-r--r-- | embassy/Cargo.toml | 4 | ||||
| -rw-r--r-- | examples/rp/Cargo.toml | 5 | ||||
| -rw-r--r-- | examples/rp/src/bin/spi_display.rs | 12 | ||||
| -rw-r--r-- | examples/stm32h7/Cargo.toml | 3 | ||||
| -rw-r--r-- | examples/stm32l4/Cargo.toml | 3 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/usart_blocking_async.rs | 30 | ||||
| -rw-r--r-- | tests/stm32/Cargo.toml | 3 |
15 files changed, 31 insertions, 55 deletions
diff --git a/embassy-lora/Cargo.toml b/embassy-lora/Cargo.toml index 97af7dd79..9ce5d9af0 100644 --- a/embassy-lora/Cargo.toml +++ b/embassy-lora/Cargo.toml | |||
| @@ -27,8 +27,8 @@ log = { version = "0.4.14", optional = true } | |||
| 27 | 27 | ||
| 28 | embassy = { version = "0.1.0", path = "../embassy", default-features = false } | 28 | embassy = { version = "0.1.0", path = "../embassy", default-features = false } |
| 29 | embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false, optional = true } | 29 | embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false, optional = true } |
| 30 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} | 30 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } |
| 31 | embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2"} | 31 | embedded-hal-async = { version = "0.1.0-alpha.0" } |
| 32 | embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common", default-features = false } | 32 | embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common", default-features = false } |
| 33 | futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } | 33 | futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } |
| 34 | embedded-hal = { version = "0.2", features = ["unproven"] } | 34 | embedded-hal = { version = "0.2", features = ["unproven"] } |
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 5299c04a8..5bb76abf4 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -67,8 +67,8 @@ embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } | |||
| 67 | embassy-usb = {version = "0.1.0", path = "../embassy-usb", optional=true } | 67 | embassy-usb = {version = "0.1.0", path = "../embassy-usb", optional=true } |
| 68 | 68 | ||
| 69 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } | 69 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } |
| 70 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} | 70 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true} |
| 71 | embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} | 71 | embedded-hal-async = { version = "0.1.0-alpha.0", optional = true} |
| 72 | 72 | ||
| 73 | defmt = { version = "0.3", optional = true } | 73 | defmt = { version = "0.3", optional = true } |
| 74 | log = { version = "0.4.14", optional = true } | 74 | log = { version = "0.4.14", optional = true } |
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs index 2b01dd075..4f1c3da1e 100644 --- a/embassy-nrf/src/uarte.rs +++ b/embassy-nrf/src/uarte.rs | |||
| @@ -935,7 +935,7 @@ mod eh1 { | |||
| 935 | } | 935 | } |
| 936 | 936 | ||
| 937 | cfg_if::cfg_if! { | 937 | cfg_if::cfg_if! { |
| 938 | if #[cfg(all(feature = "unstable-traits", feature = "nightly"))] { | 938 | if #[cfg(all(feature = "unstable-traits", feature = "nightly", feature = "_todo_embedded_hal_serial"))] { |
| 939 | use core::future::Future; | 939 | use core::future::Future; |
| 940 | 940 | ||
| 941 | impl<'d, T: Instance> embedded_hal_async::serial::Read for Uarte<'d, T> { | 941 | impl<'d, T: Instance> embedded_hal_async::serial::Read for Uarte<'d, T> { |
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index deed88730..17fce54e5 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml | |||
| @@ -42,5 +42,5 @@ rp2040-pac2 = { git = "https://github.com/embassy-rs/rp2040-pac2", rev="9ad7223a | |||
| 42 | #rp2040-pac2 = { path = "../../rp/rp2040-pac2", features = ["rt"] } | 42 | #rp2040-pac2 = { path = "../../rp/rp2040-pac2", features = ["rt"] } |
| 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-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} | 45 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true} |
| 46 | embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} | 46 | embedded-hal-async = { version = "0.1.0-alpha.0", optional = true} |
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 91a65193f..1c9616b71 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml | |||
| @@ -39,8 +39,8 @@ embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } | |||
| 39 | embassy-net = { version = "0.1.0", path = "../embassy-net", optional = true } | 39 | embassy-net = { version = "0.1.0", path = "../embassy-net", optional = true } |
| 40 | 40 | ||
| 41 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } | 41 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } |
| 42 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} | 42 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true} |
| 43 | embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} | 43 | embedded-hal-async = { version = "0.1.0-alpha.0", optional = true} |
| 44 | 44 | ||
| 45 | defmt = { version = "0.3", optional = true } | 45 | defmt = { version = "0.3", optional = true } |
| 46 | log = { version = "0.4.14", optional = true } | 46 | log = { version = "0.4.14", optional = true } |
diff --git a/embassy-stm32/src/usart/mod.rs b/embassy-stm32/src/usart/mod.rs index caea8d71b..22224215c 100644 --- a/embassy-stm32/src/usart/mod.rs +++ b/embassy-stm32/src/usart/mod.rs | |||
| @@ -363,7 +363,7 @@ mod eh1 { | |||
| 363 | } | 363 | } |
| 364 | 364 | ||
| 365 | cfg_if::cfg_if! { | 365 | cfg_if::cfg_if! { |
| 366 | if #[cfg(all(feature = "unstable-traits", feature = "nightly"))] { | 366 | if #[cfg(all(feature = "unstable-traits", feature = "nightly", feature = "_todo_embedded_hal_serial"))] { |
| 367 | use core::future::Future; | 367 | use core::future::Future; |
| 368 | 368 | ||
| 369 | impl<'d, T: Instance, TxDma> embedded_hal_async::serial::Write for UartTx<'d, T, TxDma> | 369 | impl<'d, T: Instance, TxDma> embedded_hal_async::serial::Write for UartTx<'d, T, TxDma> |
diff --git a/embassy-traits/Cargo.toml b/embassy-traits/Cargo.toml index e23259eb4..4e0e7d22d 100644 --- a/embassy-traits/Cargo.toml +++ b/embassy-traits/Cargo.toml | |||
| @@ -9,8 +9,8 @@ std = [] | |||
| 9 | 9 | ||
| 10 | [dependencies] | 10 | [dependencies] |
| 11 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } | 11 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } |
| 12 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2" } | 12 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } |
| 13 | embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2"} | 13 | embedded-hal-async = { version = "0.1.0-alpha.0" } |
| 14 | embedded-storage = "0.3.0" | 14 | embedded-storage = "0.3.0" |
| 15 | embedded-storage-async = "0.3.0" | 15 | embedded-storage-async = "0.3.0" |
| 16 | nb = "1.0.0" | 16 | nb = "1.0.0" |
diff --git a/embassy-traits/src/adapter.rs b/embassy-traits/src/adapter.rs index b709f389f..033efb7ef 100644 --- a/embassy-traits/src/adapter.rs +++ b/embassy-traits/src/adapter.rs | |||
| @@ -161,6 +161,7 @@ where | |||
| 161 | type Error = E; | 161 | type Error = E; |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | #[cfg(feature = "_todo_embedded_hal_serial")] | ||
| 164 | impl<T, E> embedded_hal_async::serial::Read for BlockingAsync<T> | 165 | impl<T, E> embedded_hal_async::serial::Read for BlockingAsync<T> |
| 165 | where | 166 | where |
| 166 | T: serial::Read<u8, Error = E>, | 167 | T: serial::Read<u8, Error = E>, |
| @@ -185,6 +186,7 @@ where | |||
| 185 | } | 186 | } |
| 186 | } | 187 | } |
| 187 | 188 | ||
| 189 | #[cfg(feature = "_todo_embedded_hal_serial")] | ||
| 188 | impl<T, E> embedded_hal_async::serial::Write for BlockingAsync<T> | 190 | impl<T, E> embedded_hal_async::serial::Write for BlockingAsync<T> |
| 189 | where | 191 | where |
| 190 | T: blocking::serial::Write<u8, Error = E> + serial::Read<u8, Error = E>, | 192 | T: blocking::serial::Write<u8, Error = E> + serial::Read<u8, Error = E>, |
diff --git a/embassy/Cargo.toml b/embassy/Cargo.toml index 7753c3b05..1baeb6c3d 100644 --- a/embassy/Cargo.toml +++ b/embassy/Cargo.toml | |||
| @@ -57,8 +57,8 @@ defmt = { version = "0.3", optional = true } | |||
| 57 | log = { version = "0.4.14", optional = true } | 57 | log = { version = "0.4.14", optional = true } |
| 58 | 58 | ||
| 59 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6" } | 59 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6" } |
| 60 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} | 60 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true} |
| 61 | embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} | 61 | embedded-hal-async = { version = "0.1.0-alpha.0", optional = true} |
| 62 | 62 | ||
| 63 | futures = { version = "0.3.17", default-features = false, features = [ "cfg-target-has-atomic", "unstable" ] } | 63 | futures = { version = "0.3.17", default-features = false, features = [ "cfg-target-has-atomic", "unstable" ] } |
| 64 | pin-project = { version = "1.0.8", default-features = false } | 64 | pin-project = { version = "1.0.8", default-features = false } |
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index 2cce0af37..827adea23 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -20,7 +20,8 @@ futures = { version = "0.3.17", default-features = false, features = ["async-awa | |||
| 20 | display-interface-spi = "0.4.1" | 20 | display-interface-spi = "0.4.1" |
| 21 | embedded-graphics = "0.7.1" | 21 | embedded-graphics = "0.7.1" |
| 22 | st7789 = "0.6.1" | 22 | st7789 = "0.6.1" |
| 23 | |||
| 24 | embedded-hal = { version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2" } | ||
| 25 | display-interface = "0.4.1" | 23 | display-interface = "0.4.1" |
| 26 | byte-slice-cast = { version = "1.2.0", default-features = false } | 24 | byte-slice-cast = { version = "1.2.0", default-features = false } |
| 25 | |||
| 26 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } | ||
| 27 | embedded-hal-async = { version = "0.1.0-alpha.0" } | ||
diff --git a/examples/rp/src/bin/spi_display.rs b/examples/rp/src/bin/spi_display.rs index bc93e0617..5c3c4c4c5 100644 --- a/examples/rp/src/bin/spi_display.rs +++ b/examples/rp/src/bin/spi_display.rs | |||
| @@ -110,9 +110,9 @@ mod shared_spi { | |||
| 110 | use core::cell::RefCell; | 110 | use core::cell::RefCell; |
| 111 | use core::fmt::Debug; | 111 | use core::fmt::Debug; |
| 112 | 112 | ||
| 113 | use embedded_hal::digital::blocking::OutputPin; | 113 | use embedded_hal_1::digital::blocking::OutputPin; |
| 114 | use embedded_hal::spi; | 114 | use embedded_hal_1::spi; |
| 115 | use embedded_hal::spi::blocking::SpiDevice; | 115 | use embedded_hal_1::spi::blocking::SpiDevice; |
| 116 | 116 | ||
| 117 | #[derive(Copy, Clone, Eq, PartialEq, Debug)] | 117 | #[derive(Copy, Clone, Eq, PartialEq, Debug)] |
| 118 | pub enum SpiDeviceWithCsError<BUS, CS> { | 118 | pub enum SpiDeviceWithCsError<BUS, CS> { |
| @@ -184,7 +184,7 @@ mod shared_spi { | |||
| 184 | 184 | ||
| 185 | /// Driver for the XPT2046 resistive touchscreen sensor | 185 | /// Driver for the XPT2046 resistive touchscreen sensor |
| 186 | mod touch { | 186 | mod touch { |
| 187 | use embedded_hal::spi::blocking::{SpiBus, SpiBusRead, SpiBusWrite, SpiDevice}; | 187 | use embedded_hal_1::spi::blocking::{SpiBus, SpiBusRead, SpiBusWrite, SpiDevice}; |
| 188 | 188 | ||
| 189 | struct Calibration { | 189 | struct Calibration { |
| 190 | x1: i32, | 190 | x1: i32, |
| @@ -248,8 +248,8 @@ mod touch { | |||
| 248 | 248 | ||
| 249 | mod my_display_interface { | 249 | mod my_display_interface { |
| 250 | use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand}; | 250 | use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand}; |
| 251 | use embedded_hal::digital::blocking::OutputPin; | 251 | use embedded_hal_1::digital::blocking::OutputPin; |
| 252 | use embedded_hal::spi::blocking::{SpiBusWrite, SpiDevice}; | 252 | use embedded_hal_1::spi::blocking::{SpiBusWrite, SpiDevice}; |
| 253 | 253 | ||
| 254 | /// SPI display interface. | 254 | /// SPI display interface. |
| 255 | /// | 255 | /// |
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index f237a8173..419bbec31 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml | |||
| @@ -18,7 +18,8 @@ defmt-rtt = "0.3" | |||
| 18 | cortex-m = "0.7.3" | 18 | cortex-m = "0.7.3" |
| 19 | cortex-m-rt = "0.7.0" | 19 | cortex-m-rt = "0.7.0" |
| 20 | embedded-hal = "0.2.6" | 20 | embedded-hal = "0.2.6" |
| 21 | embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2"} | 21 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } |
| 22 | embedded-hal-async = { version = "0.1.0-alpha.0" } | ||
| 22 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 23 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 23 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 24 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 24 | heapless = { version = "0.7.5", default-features = false } | 25 | heapless = { version = "0.7.5", default-features = false } |
diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml index 5838d01db..2da549bb2 100644 --- a/examples/stm32l4/Cargo.toml +++ b/examples/stm32l4/Cargo.toml | |||
| @@ -18,7 +18,8 @@ defmt-rtt = "0.3" | |||
| 18 | cortex-m = "0.7.3" | 18 | cortex-m = "0.7.3" |
| 19 | cortex-m-rt = "0.7.0" | 19 | cortex-m-rt = "0.7.0" |
| 20 | embedded-hal = "0.2.6" | 20 | embedded-hal = "0.2.6" |
| 21 | embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2"} | 21 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } |
| 22 | embedded-hal-async = { version = "0.1.0-alpha.0" } | ||
| 22 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 23 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 23 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 24 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 24 | heapless = { version = "0.7.5", default-features = false } | 25 | heapless = { version = "0.7.5", default-features = false } |
diff --git a/examples/stm32l4/src/bin/usart_blocking_async.rs b/examples/stm32l4/src/bin/usart_blocking_async.rs deleted file mode 100644 index 7efccace5..000000000 --- a/examples/stm32l4/src/bin/usart_blocking_async.rs +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | #![feature(type_alias_impl_trait)] | ||
| 4 | |||
| 5 | use defmt_rtt as _; // global logger | ||
| 6 | use panic_probe as _; | ||
| 7 | |||
| 8 | use defmt::*; | ||
| 9 | use embassy::executor::Spawner; | ||
| 10 | use embassy_stm32::dma::NoDma; | ||
| 11 | use embassy_stm32::usart::{Config, Uart}; | ||
| 12 | use embassy_stm32::Peripherals; | ||
| 13 | use embassy_traits::adapter::BlockingAsync; | ||
| 14 | use embedded_hal_async::serial::{Read, Write}; | ||
| 15 | |||
| 16 | #[embassy::main] | ||
| 17 | async fn main(_spawner: Spawner, p: Peripherals) { | ||
| 18 | let config = Config::default(); | ||
| 19 | let usart = Uart::new(p.UART4, p.PA1, p.PA0, NoDma, NoDma, config); | ||
| 20 | let mut usart = BlockingAsync::new(usart); | ||
| 21 | |||
| 22 | unwrap!(usart.write(b"Hello Embassy World!\r\n").await); | ||
| 23 | info!("wrote Hello, starting echo"); | ||
| 24 | |||
| 25 | let mut buf = [0u8; 1]; | ||
| 26 | loop { | ||
| 27 | unwrap!(usart.read(&mut buf).await); | ||
| 28 | unwrap!(usart.write(&buf).await); | ||
| 29 | } | ||
| 30 | } | ||
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml index 9893b0289..260ac223b 100644 --- a/tests/stm32/Cargo.toml +++ b/tests/stm32/Cargo.toml | |||
| @@ -23,7 +23,8 @@ defmt-rtt = "0.3.0" | |||
| 23 | cortex-m = "0.7.3" | 23 | cortex-m = "0.7.3" |
| 24 | cortex-m-rt = "0.7.0" | 24 | cortex-m-rt = "0.7.0" |
| 25 | embedded-hal = "0.2.6" | 25 | embedded-hal = "0.2.6" |
| 26 | embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2"} | 26 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } |
| 27 | embedded-hal-async = { version = "0.1.0-alpha.0" } | ||
| 27 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } | 28 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } |
| 28 | 29 | ||
| 29 | [profile.dev] | 30 | [profile.dev] |
