aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-lora/Cargo.toml4
-rw-r--r--embassy-nrf/Cargo.toml4
-rw-r--r--embassy-nrf/src/uarte.rs2
-rw-r--r--embassy-rp/Cargo.toml4
-rw-r--r--embassy-stm32/Cargo.toml4
-rw-r--r--embassy-stm32/src/usart/mod.rs2
-rw-r--r--embassy-traits/Cargo.toml4
-rw-r--r--embassy-traits/src/adapter.rs2
-rw-r--r--embassy/Cargo.toml4
-rw-r--r--examples/rp/Cargo.toml5
-rw-r--r--examples/rp/src/bin/spi_display.rs12
-rw-r--r--examples/stm32h7/Cargo.toml3
-rw-r--r--examples/stm32l4/Cargo.toml3
-rw-r--r--examples/stm32l4/src/bin/usart_blocking_async.rs30
-rw-r--r--tests/stm32/Cargo.toml3
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
28embassy = { version = "0.1.0", path = "../embassy", default-features = false } 28embassy = { version = "0.1.0", path = "../embassy", default-features = false }
29embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false, optional = true } 29embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false, optional = true }
30embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} 30embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" }
31embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2"} 31embedded-hal-async = { version = "0.1.0-alpha.0" }
32embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common", default-features = false } 32embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common", default-features = false }
33futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } 33futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] }
34embedded-hal = { version = "0.2", features = ["unproven"] } 34embedded-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" }
67embassy-usb = {version = "0.1.0", path = "../embassy-usb", optional=true } 67embassy-usb = {version = "0.1.0", path = "../embassy-usb", optional=true }
68 68
69embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 69embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
70embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} 70embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true}
71embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} 71embedded-hal-async = { version = "0.1.0-alpha.0", optional = true}
72 72
73defmt = { version = "0.3", optional = true } 73defmt = { version = "0.3", optional = true }
74log = { version = "0.4.14", optional = true } 74log = { 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
937cfg_if::cfg_if! { 937cfg_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
44embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 44embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
45embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} 45embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true}
46embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} 46embedded-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" }
39embassy-net = { version = "0.1.0", path = "../embassy-net", optional = true } 39embassy-net = { version = "0.1.0", path = "../embassy-net", optional = true }
40 40
41embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 41embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
42embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} 42embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true}
43embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} 43embedded-hal-async = { version = "0.1.0-alpha.0", optional = true}
44 44
45defmt = { version = "0.3", optional = true } 45defmt = { version = "0.3", optional = true }
46log = { version = "0.4.14", optional = true } 46log = { 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
365cfg_if::cfg_if! { 365cfg_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]
11embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 11embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
12embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2" } 12embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" }
13embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2"} 13embedded-hal-async = { version = "0.1.0-alpha.0" }
14embedded-storage = "0.3.0" 14embedded-storage = "0.3.0"
15embedded-storage-async = "0.3.0" 15embedded-storage-async = "0.3.0"
16nb = "1.0.0" 16nb = "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")]
164impl<T, E> embedded_hal_async::serial::Read for BlockingAsync<T> 165impl<T, E> embedded_hal_async::serial::Read for BlockingAsync<T>
165where 166where
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")]
188impl<T, E> embedded_hal_async::serial::Write for BlockingAsync<T> 190impl<T, E> embedded_hal_async::serial::Write for BlockingAsync<T>
189where 191where
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 }
57log = { version = "0.4.14", optional = true } 57log = { version = "0.4.14", optional = true }
58 58
59embedded-hal-02 = { package = "embedded-hal", version = "0.2.6" } 59embedded-hal-02 = { package = "embedded-hal", version = "0.2.6" }
60embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} 60embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true}
61embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} 61embedded-hal-async = { version = "0.1.0-alpha.0", optional = true}
62 62
63futures = { version = "0.3.17", default-features = false, features = [ "cfg-target-has-atomic", "unstable" ] } 63futures = { version = "0.3.17", default-features = false, features = [ "cfg-target-has-atomic", "unstable" ] }
64pin-project = { version = "1.0.8", default-features = false } 64pin-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
20display-interface-spi = "0.4.1" 20display-interface-spi = "0.4.1"
21embedded-graphics = "0.7.1" 21embedded-graphics = "0.7.1"
22st7789 = "0.6.1" 22st7789 = "0.6.1"
23
24embedded-hal = { version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2" }
25display-interface = "0.4.1" 23display-interface = "0.4.1"
26byte-slice-cast = { version = "1.2.0", default-features = false } 24byte-slice-cast = { version = "1.2.0", default-features = false }
25
26embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" }
27embedded-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
186mod touch { 186mod 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
249mod my_display_interface { 249mod 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"
18cortex-m = "0.7.3" 18cortex-m = "0.7.3"
19cortex-m-rt = "0.7.0" 19cortex-m-rt = "0.7.0"
20embedded-hal = "0.2.6" 20embedded-hal = "0.2.6"
21embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2"} 21embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" }
22embedded-hal-async = { version = "0.1.0-alpha.0" }
22panic-probe = { version = "0.3", features = ["print-defmt"] } 23panic-probe = { version = "0.3", features = ["print-defmt"] }
23futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 24futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
24heapless = { version = "0.7.5", default-features = false } 25heapless = { 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"
18cortex-m = "0.7.3" 18cortex-m = "0.7.3"
19cortex-m-rt = "0.7.0" 19cortex-m-rt = "0.7.0"
20embedded-hal = "0.2.6" 20embedded-hal = "0.2.6"
21embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2"} 21embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" }
22embedded-hal-async = { version = "0.1.0-alpha.0" }
22panic-probe = { version = "0.3", features = ["print-defmt"] } 23panic-probe = { version = "0.3", features = ["print-defmt"] }
23futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 24futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
24heapless = { version = "0.7.5", default-features = false } 25heapless = { 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
5use defmt_rtt as _; // global logger
6use panic_probe as _;
7
8use defmt::*;
9use embassy::executor::Spawner;
10use embassy_stm32::dma::NoDma;
11use embassy_stm32::usart::{Config, Uart};
12use embassy_stm32::Peripherals;
13use embassy_traits::adapter::BlockingAsync;
14use embedded_hal_async::serial::{Read, Write};
15
16#[embassy::main]
17async 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"
23cortex-m = "0.7.3" 23cortex-m = "0.7.3"
24cortex-m-rt = "0.7.0" 24cortex-m-rt = "0.7.0"
25embedded-hal = "0.2.6" 25embedded-hal = "0.2.6"
26embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2"} 26embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" }
27embedded-hal-async = { version = "0.1.0-alpha.0" }
27panic-probe = { version = "0.3.0", features = ["print-defmt"] } 28panic-probe = { version = "0.3.0", features = ["print-defmt"] }
28 29
29[profile.dev] 30[profile.dev]