aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-09-29 09:29:33 +0000
committerGitHub <[email protected]>2022-09-29 09:29:33 +0000
commit8b9f4ad259ebb2c4fd2258f1c12ac33a5a8f8976 (patch)
treef573324f2449b68b7b1fef579b755a67dbb406d7
parent77ece3f903735b50f265ddd43520c50e0f28c1a1 (diff)
parent72c2e985bb481fbc2e138a8e98b9dbb27878f370 (diff)
Merge #988
988: Update embedded-hal versions and explicitly pin r=lulf a=lulf Pinning to ensure CI don't accidentally break. Co-authored-by: Ulf Lilleengen <[email protected]>
-rw-r--r--embassy-embedded-hal/Cargo.toml4
-rw-r--r--embassy-embedded-hal/src/shared_bus/asynch/spi.rs6
-rw-r--r--embassy-embedded-hal/src/shared_bus/blocking/i2c.rs3
-rw-r--r--embassy-embedded-hal/src/shared_bus/blocking/spi.rs8
-rw-r--r--embassy-lora/Cargo.toml4
-rw-r--r--embassy-nrf/Cargo.toml4
-rw-r--r--embassy-nrf/src/gpio.rs12
-rw-r--r--embassy-nrf/src/gpiote.rs2
-rw-r--r--embassy-nrf/src/spim.rs8
-rw-r--r--embassy-nrf/src/twim.rs6
-rw-r--r--embassy-nrf/src/uarte.rs4
-rw-r--r--embassy-rp/Cargo.toml7
-rw-r--r--embassy-rp/src/gpio.rs22
-rw-r--r--embassy-rp/src/i2c.rs18
-rw-r--r--embassy-rp/src/spi.rs8
-rw-r--r--embassy-rp/src/uart/mod.rs12
-rw-r--r--embassy-stm32/Cargo.toml4
-rw-r--r--embassy-stm32/src/exti.rs2
-rw-r--r--embassy-stm32/src/gpio.rs3
-rw-r--r--embassy-stm32/src/i2c/v1.rs6
-rw-r--r--embassy-stm32/src/i2c/v2.rs6
-rw-r--r--embassy-stm32/src/spi/mod.rs8
-rw-r--r--embassy-time/Cargo.toml6
-rw-r--r--embassy-time/src/delay.rs2
-rw-r--r--examples/rp/src/bin/spi_display.rs12
-rw-r--r--examples/stm32h7/Cargo.toml4
-rw-r--r--examples/stm32l4/Cargo.toml4
-rw-r--r--tests/rp/Cargo.toml4
-rw-r--r--tests/stm32/Cargo.toml4
29 files changed, 94 insertions, 99 deletions
diff --git a/embassy-embedded-hal/Cargo.toml b/embassy-embedded-hal/Cargo.toml
index 462680720..fe8fac7c8 100644
--- a/embassy-embedded-hal/Cargo.toml
+++ b/embassy-embedded-hal/Cargo.toml
@@ -18,8 +18,8 @@ nightly = ["embedded-hal-async", "embedded-storage-async"]
18[dependencies] 18[dependencies]
19embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 19embassy-sync = { version = "0.1.0", path = "../embassy-sync" }
20embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 20embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
21embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } 21embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9" }
22embedded-hal-async = { version = "0.1.0-alpha.1", optional = true } 22embedded-hal-async = { version = "=0.1.0-alpha.2", optional = true }
23embedded-storage = "0.3.0" 23embedded-storage = "0.3.0"
24embedded-storage-async = { version = "0.3.0", optional = true } 24embedded-storage-async = { version = "0.3.0", optional = true }
25nb = "1.0.0" 25nb = "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 c95b59ef0..a3814d6d0 100644
--- a/embassy-embedded-hal/src/shared_bus/asynch/spi.rs
+++ b/embassy-embedded-hal/src/shared_bus/asynch/spi.rs
@@ -29,7 +29,7 @@ use core::future::Future;
29 29
30use embassy_sync::blocking_mutex::raw::RawMutex; 30use embassy_sync::blocking_mutex::raw::RawMutex;
31use embassy_sync::mutex::Mutex; 31use embassy_sync::mutex::Mutex;
32use embedded_hal_1::digital::blocking::OutputPin; 32use embedded_hal_1::digital::OutputPin;
33use embedded_hal_1::spi::ErrorType; 33use embedded_hal_1::spi::ErrorType;
34use embedded_hal_async::spi; 34use embedded_hal_async::spi;
35 35
@@ -57,7 +57,7 @@ where
57 type Error = SpiDeviceError<BUS::Error, CS::Error>; 57 type Error = SpiDeviceError<BUS::Error, CS::Error>;
58} 58}
59 59
60impl<M, BUS, CS> spi::SpiDevice for SpiDevice<'_, M, BUS, CS> 60unsafe impl<M, BUS, CS> spi::SpiDevice for SpiDevice<'_, M, BUS, CS>
61where 61where
62 M: RawMutex + 'static, 62 M: RawMutex + 'static,
63 BUS: spi::SpiBusFlush + 'static, 63 BUS: spi::SpiBusFlush + 'static,
@@ -122,7 +122,7 @@ where
122 type Error = SpiDeviceError<BUS::Error, CS::Error>; 122 type Error = SpiDeviceError<BUS::Error, CS::Error>;
123} 123}
124 124
125impl<M, BUS, CS> spi::SpiDevice for SpiDeviceWithConfig<'_, M, BUS, CS> 125unsafe impl<M, BUS, CS> spi::SpiDevice for SpiDeviceWithConfig<'_, M, BUS, CS>
126where 126where
127 M: RawMutex + 'static, 127 M: RawMutex + 'static,
128 BUS: spi::SpiBusFlush + SetConfig + 'static, 128 BUS: spi::SpiBusFlush + SetConfig + 'static,
diff --git a/embassy-embedded-hal/src/shared_bus/blocking/i2c.rs b/embassy-embedded-hal/src/shared_bus/blocking/i2c.rs
index a611e2d27..892000b26 100644
--- a/embassy-embedded-hal/src/shared_bus/blocking/i2c.rs
+++ b/embassy-embedded-hal/src/shared_bus/blocking/i2c.rs
@@ -20,8 +20,7 @@ use core::cell::RefCell;
20 20
21use embassy_sync::blocking_mutex::raw::RawMutex; 21use embassy_sync::blocking_mutex::raw::RawMutex;
22use embassy_sync::blocking_mutex::Mutex; 22use embassy_sync::blocking_mutex::Mutex;
23use embedded_hal_1::i2c::blocking::{I2c, Operation}; 23use embedded_hal_1::i2c::{ErrorType, I2c, Operation};
24use embedded_hal_1::i2c::ErrorType;
25 24
26use crate::shared_bus::I2cDeviceError; 25use crate::shared_bus::I2cDeviceError;
27use crate::SetConfig; 26use crate::SetConfig;
diff --git a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs
index 23845d887..4a08dc36e 100644
--- a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs
+++ b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs
@@ -22,9 +22,9 @@ use core::cell::RefCell;
22 22
23use embassy_sync::blocking_mutex::raw::RawMutex; 23use embassy_sync::blocking_mutex::raw::RawMutex;
24use embassy_sync::blocking_mutex::Mutex; 24use embassy_sync::blocking_mutex::Mutex;
25use embedded_hal_1::digital::blocking::OutputPin; 25use embedded_hal_1::digital::OutputPin;
26use embedded_hal_1::spi; 26use embedded_hal_1::spi;
27use embedded_hal_1::spi::blocking::SpiBusFlush; 27use embedded_hal_1::spi::SpiBusFlush;
28 28
29use crate::shared_bus::SpiDeviceError; 29use crate::shared_bus::SpiDeviceError;
30use crate::SetConfig; 30use crate::SetConfig;
@@ -50,7 +50,7 @@ where
50 type Error = SpiDeviceError<BUS::Error, CS::Error>; 50 type Error = SpiDeviceError<BUS::Error, CS::Error>;
51} 51}
52 52
53impl<BUS, M, CS> embedded_hal_1::spi::blocking::SpiDevice for SpiDevice<'_, M, BUS, CS> 53impl<BUS, M, CS> embedded_hal_1::spi::SpiDevice for SpiDevice<'_, M, BUS, CS>
54where 54where
55 M: RawMutex, 55 M: RawMutex,
56 BUS: SpiBusFlush, 56 BUS: SpiBusFlush,
@@ -146,7 +146,7 @@ where
146 type Error = SpiDeviceError<BUS::Error, CS::Error>; 146 type Error = SpiDeviceError<BUS::Error, CS::Error>;
147} 147}
148 148
149impl<BUS, M, CS> embedded_hal_1::spi::blocking::SpiDevice for SpiDeviceWithConfig<'_, M, BUS, CS> 149impl<BUS, M, CS> embedded_hal_1::spi::SpiDevice for SpiDeviceWithConfig<'_, M, BUS, CS>
150where 150where
151 M: RawMutex, 151 M: RawMutex,
152 BUS: SpiBusFlush + SetConfig, 152 BUS: SpiBusFlush + SetConfig,
diff --git a/embassy-lora/Cargo.toml b/embassy-lora/Cargo.toml
index 1757efa8b..dcb0d8245 100644
--- a/embassy-lora/Cargo.toml
+++ b/embassy-lora/Cargo.toml
@@ -28,8 +28,8 @@ log = { version = "0.4.14", optional = true }
28embassy-time = { version = "0.1.0", path = "../embassy-time" } 28embassy-time = { version = "0.1.0", path = "../embassy-time" }
29embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 29embassy-sync = { version = "0.1.0", path = "../embassy-sync" }
30embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false, optional = true } 30embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false, optional = true }
31embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } 31embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9" }
32embedded-hal-async = { version = "0.1.0-alpha.1" } 32embedded-hal-async = { version = "=0.1.0-alpha.2" }
33embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common", default-features = false } 33embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common", default-features = false }
34futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } 34futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] }
35embedded-hal = { version = "0.2", features = ["unproven"] } 35embedded-hal = { version = "0.2", features = ["unproven"] }
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml
index d80281fa3..58b820242 100644
--- a/embassy-nrf/Cargo.toml
+++ b/embassy-nrf/Cargo.toml
@@ -73,8 +73,8 @@ embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" }
73embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional=true } 73embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional=true }
74 74
75embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 75embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
76embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true} 76embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9", optional = true}
77embedded-hal-async = { version = "0.1.0-alpha.1", optional = true} 77embedded-hal-async = { version = "=0.1.0-alpha.2", optional = true}
78embedded-io = { version = "0.3.0", features = ["async"], optional = true } 78embedded-io = { version = "0.3.0", features = ["async"], optional = true }
79 79
80defmt = { version = "0.3", optional = true } 80defmt = { version = "0.3", optional = true }
diff --git a/embassy-nrf/src/gpio.rs b/embassy-nrf/src/gpio.rs
index 924629908..bb64e41e9 100644
--- a/embassy-nrf/src/gpio.rs
+++ b/embassy-nrf/src/gpio.rs
@@ -574,7 +574,7 @@ mod eh1 {
574 type Error = Infallible; 574 type Error = Infallible;
575 } 575 }
576 576
577 impl<'d, T: Pin> embedded_hal_1::digital::blocking::InputPin for Input<'d, T> { 577 impl<'d, T: Pin> embedded_hal_1::digital::InputPin for Input<'d, T> {
578 fn is_high(&self) -> Result<bool, Self::Error> { 578 fn is_high(&self) -> Result<bool, Self::Error> {
579 Ok(self.is_high()) 579 Ok(self.is_high())
580 } 580 }
@@ -588,7 +588,7 @@ mod eh1 {
588 type Error = Infallible; 588 type Error = Infallible;
589 } 589 }
590 590
591 impl<'d, T: Pin> embedded_hal_1::digital::blocking::OutputPin for Output<'d, T> { 591 impl<'d, T: Pin> embedded_hal_1::digital::OutputPin for Output<'d, T> {
592 fn set_high(&mut self) -> Result<(), Self::Error> { 592 fn set_high(&mut self) -> Result<(), Self::Error> {
593 Ok(self.set_high()) 593 Ok(self.set_high())
594 } 594 }
@@ -598,7 +598,7 @@ mod eh1 {
598 } 598 }
599 } 599 }
600 600
601 impl<'d, T: Pin> embedded_hal_1::digital::blocking::StatefulOutputPin for Output<'d, T> { 601 impl<'d, T: Pin> embedded_hal_1::digital::StatefulOutputPin for Output<'d, T> {
602 fn is_set_high(&self) -> Result<bool, Self::Error> { 602 fn is_set_high(&self) -> Result<bool, Self::Error> {
603 Ok(self.is_set_high()) 603 Ok(self.is_set_high())
604 } 604 }
@@ -615,7 +615,7 @@ mod eh1 {
615 /// Implement [`InputPin`] for [`Flex`]; 615 /// Implement [`InputPin`] for [`Flex`];
616 /// 616 ///
617 /// If the pin is not in input mode the result is unspecified. 617 /// If the pin is not in input mode the result is unspecified.
618 impl<'d, T: Pin> embedded_hal_1::digital::blocking::InputPin for Flex<'d, T> { 618 impl<'d, T: Pin> embedded_hal_1::digital::InputPin for Flex<'d, T> {
619 fn is_high(&self) -> Result<bool, Self::Error> { 619 fn is_high(&self) -> Result<bool, Self::Error> {
620 Ok(self.is_high()) 620 Ok(self.is_high())
621 } 621 }
@@ -625,7 +625,7 @@ mod eh1 {
625 } 625 }
626 } 626 }
627 627
628 impl<'d, T: Pin> embedded_hal_1::digital::blocking::OutputPin for Flex<'d, T> { 628 impl<'d, T: Pin> embedded_hal_1::digital::OutputPin for Flex<'d, T> {
629 fn set_high(&mut self) -> Result<(), Self::Error> { 629 fn set_high(&mut self) -> Result<(), Self::Error> {
630 Ok(self.set_high()) 630 Ok(self.set_high())
631 } 631 }
@@ -635,7 +635,7 @@ mod eh1 {
635 } 635 }
636 } 636 }
637 637
638 impl<'d, T: Pin> embedded_hal_1::digital::blocking::StatefulOutputPin for Flex<'d, T> { 638 impl<'d, T: Pin> embedded_hal_1::digital::StatefulOutputPin for Flex<'d, T> {
639 fn is_set_high(&self) -> Result<bool, Self::Error> { 639 fn is_set_high(&self) -> Result<bool, Self::Error> {
640 Ok(self.is_set_high()) 640 Ok(self.is_set_high())
641 } 641 }
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs
index b418be9d5..25ad90496 100644
--- a/embassy-nrf/src/gpiote.rs
+++ b/embassy-nrf/src/gpiote.rs
@@ -457,7 +457,7 @@ mod eh1 {
457 type Error = Infallible; 457 type Error = Infallible;
458 } 458 }
459 459
460 impl<'d, C: Channel, T: GpioPin> embedded_hal_1::digital::blocking::InputPin for InputChannel<'d, C, T> { 460 impl<'d, C: Channel, T: GpioPin> embedded_hal_1::digital::InputPin for InputChannel<'d, C, T> {
461 fn is_high(&self) -> Result<bool, Self::Error> { 461 fn is_high(&self) -> Result<bool, Self::Error> {
462 Ok(self.pin.is_high()) 462 Ok(self.pin.is_high())
463 } 463 }
diff --git a/embassy-nrf/src/spim.rs b/embassy-nrf/src/spim.rs
index 51cd73a47..d821d2353 100644
--- a/embassy-nrf/src/spim.rs
+++ b/embassy-nrf/src/spim.rs
@@ -446,25 +446,25 @@ mod eh1 {
446 type Error = Error; 446 type Error = Error;
447 } 447 }
448 448
449 impl<'d, T: Instance> embedded_hal_1::spi::blocking::SpiBusFlush for Spim<'d, T> { 449 impl<'d, T: Instance> embedded_hal_1::spi::SpiBusFlush for Spim<'d, T> {
450 fn flush(&mut self) -> Result<(), Self::Error> { 450 fn flush(&mut self) -> Result<(), Self::Error> {
451 Ok(()) 451 Ok(())
452 } 452 }
453 } 453 }
454 454
455 impl<'d, T: Instance> embedded_hal_1::spi::blocking::SpiBusRead<u8> for Spim<'d, T> { 455 impl<'d, T: Instance> embedded_hal_1::spi::SpiBusRead<u8> for Spim<'d, T> {
456 fn read(&mut self, words: &mut [u8]) -> Result<(), Self::Error> { 456 fn read(&mut self, words: &mut [u8]) -> Result<(), Self::Error> {
457 self.blocking_transfer(words, &[]) 457 self.blocking_transfer(words, &[])
458 } 458 }
459 } 459 }
460 460
461 impl<'d, T: Instance> embedded_hal_1::spi::blocking::SpiBusWrite<u8> for Spim<'d, T> { 461 impl<'d, T: Instance> embedded_hal_1::spi::SpiBusWrite<u8> for Spim<'d, T> {
462 fn write(&mut self, words: &[u8]) -> Result<(), Self::Error> { 462 fn write(&mut self, words: &[u8]) -> Result<(), Self::Error> {
463 self.blocking_write(words) 463 self.blocking_write(words)
464 } 464 }
465 } 465 }
466 466
467 impl<'d, T: Instance> embedded_hal_1::spi::blocking::SpiBus<u8> for Spim<'d, T> { 467 impl<'d, T: Instance> embedded_hal_1::spi::SpiBus<u8> for Spim<'d, T> {
468 fn transfer(&mut self, read: &mut [u8], write: &[u8]) -> Result<(), Self::Error> { 468 fn transfer(&mut self, read: &mut [u8], write: &[u8]) -> Result<(), Self::Error> {
469 self.blocking_transfer(read, write) 469 self.blocking_transfer(read, write)
470 } 470 }
diff --git a/embassy-nrf/src/twim.rs b/embassy-nrf/src/twim.rs
index 7c6ca1d30..8d6171fac 100644
--- a/embassy-nrf/src/twim.rs
+++ b/embassy-nrf/src/twim.rs
@@ -793,7 +793,7 @@ mod eh1 {
793 type Error = Error; 793 type Error = Error;
794 } 794 }
795 795
796 impl<'d, T: Instance> embedded_hal_1::i2c::blocking::I2c for Twim<'d, T> { 796 impl<'d, T: Instance> embedded_hal_1::i2c::I2c for Twim<'d, T> {
797 fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> { 797 fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> {
798 self.blocking_read(address, buffer) 798 self.blocking_read(address, buffer)
799 } 799 }
@@ -823,14 +823,14 @@ mod eh1 {
823 fn transaction<'a>( 823 fn transaction<'a>(
824 &mut self, 824 &mut self,
825 _address: u8, 825 _address: u8,
826 _operations: &mut [embedded_hal_1::i2c::blocking::Operation<'a>], 826 _operations: &mut [embedded_hal_1::i2c::Operation<'a>],
827 ) -> Result<(), Self::Error> { 827 ) -> Result<(), Self::Error> {
828 todo!(); 828 todo!();
829 } 829 }
830 830
831 fn transaction_iter<'a, O>(&mut self, _address: u8, _operations: O) -> Result<(), Self::Error> 831 fn transaction_iter<'a, O>(&mut self, _address: u8, _operations: O) -> Result<(), Self::Error>
832 where 832 where
833 O: IntoIterator<Item = embedded_hal_1::i2c::blocking::Operation<'a>>, 833 O: IntoIterator<Item = embedded_hal_1::i2c::Operation<'a>>,
834 { 834 {
835 todo!(); 835 todo!();
836 } 836 }
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs
index 5f9c4f17d..d99599112 100644
--- a/embassy-nrf/src/uarte.rs
+++ b/embassy-nrf/src/uarte.rs
@@ -1040,7 +1040,7 @@ mod eh1 {
1040 type Error = Error; 1040 type Error = Error;
1041 } 1041 }
1042 1042
1043 impl<'d, T: Instance> embedded_hal_1::serial::blocking::Write for Uarte<'d, T> { 1043 impl<'d, T: Instance> embedded_hal_1::serial::Write for Uarte<'d, T> {
1044 fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> { 1044 fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> {
1045 self.blocking_write(buffer) 1045 self.blocking_write(buffer)
1046 } 1046 }
@@ -1054,7 +1054,7 @@ mod eh1 {
1054 type Error = Error; 1054 type Error = Error;
1055 } 1055 }
1056 1056
1057 impl<'d, T: Instance> embedded_hal_1::serial::blocking::Write for UarteTx<'d, T> { 1057 impl<'d, T: Instance> embedded_hal_1::serial::Write for UarteTx<'d, T> {
1058 fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> { 1058 fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> {
1059 self.blocking_write(buffer) 1059 self.blocking_write(buffer)
1060 } 1060 }
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml
index 337a84f4a..3aca5dbb4 100644
--- a/embassy-rp/Cargo.toml
+++ b/embassy-rp/Cargo.toml
@@ -31,7 +31,7 @@ nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "
31 31
32# Implement embedded-hal 1.0 alpha traits. 32# Implement embedded-hal 1.0 alpha traits.
33# Implement embedded-hal-async traits if `nightly` is set as well. 33# Implement embedded-hal-async traits if `nightly` is set as well.
34unstable-traits = ["embedded-hal-1"] 34unstable-traits = ["embedded-hal-1", "embedded-hal-nb"]
35 35
36[dependencies] 36[dependencies]
37embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 37embassy-sync = { version = "0.1.0", path = "../embassy-sync" }
@@ -58,5 +58,6 @@ rp2040-pac2 = { git = "https://github.com/embassy-rs/rp2040-pac2", rev="017e3c90
58#rp2040-pac2 = { path = "../../rp2040-pac2", features = ["rt"] } 58#rp2040-pac2 = { path = "../../rp2040-pac2", features = ["rt"] }
59 59
60embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 60embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
61embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true} 61embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9", optional = true}
62embedded-hal-async = { version = "0.1.0-alpha.1", optional = true} 62embedded-hal-async = { version = "=0.1.0-alpha.2", optional = true}
63embedded-hal-nb = { version = "=1.0.0-alpha.1", optional = true}
diff --git a/embassy-rp/src/gpio.rs b/embassy-rp/src/gpio.rs
index 9b9a08110..a28bae96b 100644
--- a/embassy-rp/src/gpio.rs
+++ b/embassy-rp/src/gpio.rs
@@ -867,7 +867,7 @@ mod eh1 {
867 type Error = Infallible; 867 type Error = Infallible;
868 } 868 }
869 869
870 impl<'d, T: Pin> embedded_hal_1::digital::blocking::InputPin for Input<'d, T> { 870 impl<'d, T: Pin> embedded_hal_1::digital::InputPin for Input<'d, T> {
871 fn is_high(&self) -> Result<bool, Self::Error> { 871 fn is_high(&self) -> Result<bool, Self::Error> {
872 Ok(self.is_high()) 872 Ok(self.is_high())
873 } 873 }
@@ -881,7 +881,7 @@ mod eh1 {
881 type Error = Infallible; 881 type Error = Infallible;
882 } 882 }
883 883
884 impl<'d, T: Pin> embedded_hal_1::digital::blocking::OutputPin for Output<'d, T> { 884 impl<'d, T: Pin> embedded_hal_1::digital::OutputPin for Output<'d, T> {
885 fn set_high(&mut self) -> Result<(), Self::Error> { 885 fn set_high(&mut self) -> Result<(), Self::Error> {
886 Ok(self.set_high()) 886 Ok(self.set_high())
887 } 887 }
@@ -891,7 +891,7 @@ mod eh1 {
891 } 891 }
892 } 892 }
893 893
894 impl<'d, T: Pin> embedded_hal_1::digital::blocking::StatefulOutputPin for Output<'d, T> { 894 impl<'d, T: Pin> embedded_hal_1::digital::StatefulOutputPin for Output<'d, T> {
895 fn is_set_high(&self) -> Result<bool, Self::Error> { 895 fn is_set_high(&self) -> Result<bool, Self::Error> {
896 Ok(self.is_set_high()) 896 Ok(self.is_set_high())
897 } 897 }
@@ -901,7 +901,7 @@ mod eh1 {
901 } 901 }
902 } 902 }
903 903
904 impl<'d, T: Pin> embedded_hal_1::digital::blocking::ToggleableOutputPin for Output<'d, T> { 904 impl<'d, T: Pin> embedded_hal_1::digital::ToggleableOutputPin for Output<'d, T> {
905 fn toggle(&mut self) -> Result<(), Self::Error> { 905 fn toggle(&mut self) -> Result<(), Self::Error> {
906 Ok(self.toggle()) 906 Ok(self.toggle())
907 } 907 }
@@ -911,7 +911,7 @@ mod eh1 {
911 type Error = Infallible; 911 type Error = Infallible;
912 } 912 }
913 913
914 impl<'d, T: Pin> embedded_hal_1::digital::blocking::OutputPin for OutputOpenDrain<'d, T> { 914 impl<'d, T: Pin> embedded_hal_1::digital::OutputPin for OutputOpenDrain<'d, T> {
915 fn set_high(&mut self) -> Result<(), Self::Error> { 915 fn set_high(&mut self) -> Result<(), Self::Error> {
916 Ok(self.set_high()) 916 Ok(self.set_high())
917 } 917 }
@@ -921,7 +921,7 @@ mod eh1 {
921 } 921 }
922 } 922 }
923 923
924 impl<'d, T: Pin> embedded_hal_1::digital::blocking::StatefulOutputPin for OutputOpenDrain<'d, T> { 924 impl<'d, T: Pin> embedded_hal_1::digital::StatefulOutputPin for OutputOpenDrain<'d, T> {
925 fn is_set_high(&self) -> Result<bool, Self::Error> { 925 fn is_set_high(&self) -> Result<bool, Self::Error> {
926 Ok(self.is_set_high()) 926 Ok(self.is_set_high())
927 } 927 }
@@ -931,7 +931,7 @@ mod eh1 {
931 } 931 }
932 } 932 }
933 933
934 impl<'d, T: Pin> embedded_hal_1::digital::blocking::ToggleableOutputPin for OutputOpenDrain<'d, T> { 934 impl<'d, T: Pin> embedded_hal_1::digital::ToggleableOutputPin for OutputOpenDrain<'d, T> {
935 fn toggle(&mut self) -> Result<(), Self::Error> { 935 fn toggle(&mut self) -> Result<(), Self::Error> {
936 Ok(self.toggle()) 936 Ok(self.toggle())
937 } 937 }
@@ -941,7 +941,7 @@ mod eh1 {
941 type Error = Infallible; 941 type Error = Infallible;
942 } 942 }
943 943
944 impl<'d, T: Pin> embedded_hal_1::digital::blocking::InputPin for Flex<'d, T> { 944 impl<'d, T: Pin> embedded_hal_1::digital::InputPin for Flex<'d, T> {
945 fn is_high(&self) -> Result<bool, Self::Error> { 945 fn is_high(&self) -> Result<bool, Self::Error> {
946 Ok(self.is_high()) 946 Ok(self.is_high())
947 } 947 }
@@ -951,7 +951,7 @@ mod eh1 {
951 } 951 }
952 } 952 }
953 953
954 impl<'d, T: Pin> embedded_hal_1::digital::blocking::OutputPin for Flex<'d, T> { 954 impl<'d, T: Pin> embedded_hal_1::digital::OutputPin for Flex<'d, T> {
955 fn set_high(&mut self) -> Result<(), Self::Error> { 955 fn set_high(&mut self) -> Result<(), Self::Error> {
956 Ok(self.set_high()) 956 Ok(self.set_high())
957 } 957 }
@@ -961,7 +961,7 @@ mod eh1 {
961 } 961 }
962 } 962 }
963 963
964 impl<'d, T: Pin> embedded_hal_1::digital::blocking::StatefulOutputPin for Flex<'d, T> { 964 impl<'d, T: Pin> embedded_hal_1::digital::StatefulOutputPin for Flex<'d, T> {
965 fn is_set_high(&self) -> Result<bool, Self::Error> { 965 fn is_set_high(&self) -> Result<bool, Self::Error> {
966 Ok(self.is_set_high()) 966 Ok(self.is_set_high())
967 } 967 }
@@ -971,7 +971,7 @@ mod eh1 {
971 } 971 }
972 } 972 }
973 973
974 impl<'d, T: Pin> embedded_hal_1::digital::blocking::ToggleableOutputPin for Flex<'d, T> { 974 impl<'d, T: Pin> embedded_hal_1::digital::ToggleableOutputPin for Flex<'d, T> {
975 fn toggle(&mut self) -> Result<(), Self::Error> { 975 fn toggle(&mut self) -> Result<(), Self::Error> {
976 Ok(self.toggle()) 976 Ok(self.toggle())
977 } 977 }
diff --git a/embassy-rp/src/i2c.rs b/embassy-rp/src/i2c.rs
index 9596d661d..52f910cef 100644
--- a/embassy-rp/src/i2c.rs
+++ b/embassy-rp/src/i2c.rs
@@ -379,7 +379,7 @@ mod eh1 {
379 type Error = Error; 379 type Error = Error;
380 } 380 }
381 381
382 impl<'d, T: Instance, M: Mode> embedded_hal_1::i2c::blocking::I2c for I2c<'d, T, M> { 382 impl<'d, T: Instance, M: Mode> embedded_hal_1::i2c::I2c for I2c<'d, T, M> {
383 fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> { 383 fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> {
384 self.blocking_read(address, buffer) 384 self.blocking_read(address, buffer)
385 } 385 }
@@ -421,16 +421,14 @@ mod eh1 {
421 fn transaction<'a>( 421 fn transaction<'a>(
422 &mut self, 422 &mut self,
423 address: u8, 423 address: u8,
424 operations: &mut [embedded_hal_1::i2c::blocking::Operation<'a>], 424 operations: &mut [embedded_hal_1::i2c::Operation<'a>],
425 ) -> Result<(), Self::Error> { 425 ) -> Result<(), Self::Error> {
426 Self::setup(address.into())?; 426 Self::setup(address.into())?;
427 for i in 0..operations.len() { 427 for i in 0..operations.len() {
428 let last = i == operations.len() - 1; 428 let last = i == operations.len() - 1;
429 match &mut operations[i] { 429 match &mut operations[i] {
430 embedded_hal_1::i2c::blocking::Operation::Read(buf) => { 430 embedded_hal_1::i2c::Operation::Read(buf) => self.read_blocking_internal(buf, false, last)?,
431 self.read_blocking_internal(buf, false, last)? 431 embedded_hal_1::i2c::Operation::Write(buf) => self.write_blocking_internal(buf, last)?,
432 }
433 embedded_hal_1::i2c::blocking::Operation::Write(buf) => self.write_blocking_internal(buf, last)?,
434 } 432 }
435 } 433 }
436 Ok(()) 434 Ok(())
@@ -438,17 +436,15 @@ mod eh1 {
438 436
439 fn transaction_iter<'a, O>(&mut self, address: u8, operations: O) -> Result<(), Self::Error> 437 fn transaction_iter<'a, O>(&mut self, address: u8, operations: O) -> Result<(), Self::Error>
440 where 438 where
441 O: IntoIterator<Item = embedded_hal_1::i2c::blocking::Operation<'a>>, 439 O: IntoIterator<Item = embedded_hal_1::i2c::Operation<'a>>,
442 { 440 {
443 Self::setup(address.into())?; 441 Self::setup(address.into())?;
444 let mut peekable = operations.into_iter().peekable(); 442 let mut peekable = operations.into_iter().peekable();
445 while let Some(operation) = peekable.next() { 443 while let Some(operation) = peekable.next() {
446 let last = peekable.peek().is_none(); 444 let last = peekable.peek().is_none();
447 match operation { 445 match operation {
448 embedded_hal_1::i2c::blocking::Operation::Read(buf) => { 446 embedded_hal_1::i2c::Operation::Read(buf) => self.read_blocking_internal(buf, false, last)?,
449 self.read_blocking_internal(buf, false, last)? 447 embedded_hal_1::i2c::Operation::Write(buf) => self.write_blocking_internal(buf, last)?,
450 }
451 embedded_hal_1::i2c::blocking::Operation::Write(buf) => self.write_blocking_internal(buf, last)?,
452 } 448 }
453 } 449 }
454 Ok(()) 450 Ok(())
diff --git a/embassy-rp/src/spi.rs b/embassy-rp/src/spi.rs
index 03293e064..754e2dd30 100644
--- a/embassy-rp/src/spi.rs
+++ b/embassy-rp/src/spi.rs
@@ -523,25 +523,25 @@ mod eh1 {
523 type Error = Error; 523 type Error = Error;
524 } 524 }
525 525
526 impl<'d, T: Instance, M: Mode> embedded_hal_1::spi::blocking::SpiBusFlush for Spi<'d, T, M> { 526 impl<'d, T: Instance, M: Mode> embedded_hal_1::spi::SpiBusFlush for Spi<'d, T, M> {
527 fn flush(&mut self) -> Result<(), Self::Error> { 527 fn flush(&mut self) -> Result<(), Self::Error> {
528 Ok(()) 528 Ok(())
529 } 529 }
530 } 530 }
531 531
532 impl<'d, T: Instance, M: Mode> embedded_hal_1::spi::blocking::SpiBusRead<u8> for Spi<'d, T, M> { 532 impl<'d, T: Instance, M: Mode> embedded_hal_1::spi::SpiBusRead<u8> for Spi<'d, T, M> {
533 fn read(&mut self, words: &mut [u8]) -> Result<(), Self::Error> { 533 fn read(&mut self, words: &mut [u8]) -> Result<(), Self::Error> {
534 self.blocking_transfer(words, &[]) 534 self.blocking_transfer(words, &[])
535 } 535 }
536 } 536 }
537 537
538 impl<'d, T: Instance, M: Mode> embedded_hal_1::spi::blocking::SpiBusWrite<u8> for Spi<'d, T, M> { 538 impl<'d, T: Instance, M: Mode> embedded_hal_1::spi::SpiBusWrite<u8> for Spi<'d, T, M> {
539 fn write(&mut self, words: &[u8]) -> Result<(), Self::Error> { 539 fn write(&mut self, words: &[u8]) -> Result<(), Self::Error> {
540 self.blocking_write(words) 540 self.blocking_write(words)
541 } 541 }
542 } 542 }
543 543
544 impl<'d, T: Instance, M: Mode> embedded_hal_1::spi::blocking::SpiBus<u8> for Spi<'d, T, M> { 544 impl<'d, T: Instance, M: Mode> embedded_hal_1::spi::SpiBus<u8> for Spi<'d, T, M> {
545 fn transfer(&mut self, read: &mut [u8], write: &[u8]) -> Result<(), Self::Error> { 545 fn transfer(&mut self, read: &mut [u8], write: &[u8]) -> Result<(), Self::Error> {
546 self.blocking_transfer(read, write) 546 self.blocking_transfer(read, write)
547 } 547 }
diff --git a/embassy-rp/src/uart/mod.rs b/embassy-rp/src/uart/mod.rs
index 567c79db3..56c25e189 100644
--- a/embassy-rp/src/uart/mod.rs
+++ b/embassy-rp/src/uart/mod.rs
@@ -486,7 +486,7 @@ mod eh1 {
486 type Error = Error; 486 type Error = Error;
487 } 487 }
488 488
489 impl<'d, T: Instance, M: Mode> embedded_hal_1::serial::nb::Read for UartRx<'d, T, M> { 489 impl<'d, T: Instance, M: Mode> embedded_hal_nb::serial::Read for UartRx<'d, T, M> {
490 fn read(&mut self) -> nb::Result<u8, Self::Error> { 490 fn read(&mut self) -> nb::Result<u8, Self::Error> {
491 let r = T::regs(); 491 let r = T::regs();
492 unsafe { 492 unsafe {
@@ -509,7 +509,7 @@ mod eh1 {
509 } 509 }
510 } 510 }
511 511
512 impl<'d, T: Instance, M: Mode> embedded_hal_1::serial::blocking::Write for UartTx<'d, T, M> { 512 impl<'d, T: Instance, M: Mode> embedded_hal_1::serial::Write for UartTx<'d, T, M> {
513 fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> { 513 fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> {
514 self.blocking_write(buffer) 514 self.blocking_write(buffer)
515 } 515 }
@@ -519,7 +519,7 @@ mod eh1 {
519 } 519 }
520 } 520 }
521 521
522 impl<'d, T: Instance, M: Mode> embedded_hal_1::serial::nb::Write for UartTx<'d, T, M> { 522 impl<'d, T: Instance, M: Mode> embedded_hal_nb::serial::Write for UartTx<'d, T, M> {
523 fn write(&mut self, char: u8) -> nb::Result<(), Self::Error> { 523 fn write(&mut self, char: u8) -> nb::Result<(), Self::Error> {
524 self.blocking_write(&[char]).map_err(nb::Error::Other) 524 self.blocking_write(&[char]).map_err(nb::Error::Other)
525 } 525 }
@@ -529,13 +529,13 @@ mod eh1 {
529 } 529 }
530 } 530 }
531 531
532 impl<'d, T: Instance, M: Mode> embedded_hal_1::serial::nb::Read for Uart<'d, T, M> { 532 impl<'d, T: Instance, M: Mode> embedded_hal_nb::serial::Read for Uart<'d, T, M> {
533 fn read(&mut self) -> Result<u8, nb::Error<Self::Error>> { 533 fn read(&mut self) -> Result<u8, nb::Error<Self::Error>> {
534 embedded_hal_02::serial::Read::read(&mut self.rx) 534 embedded_hal_02::serial::Read::read(&mut self.rx)
535 } 535 }
536 } 536 }
537 537
538 impl<'d, T: Instance, M: Mode> embedded_hal_1::serial::blocking::Write for Uart<'d, T, M> { 538 impl<'d, T: Instance, M: Mode> embedded_hal_1::serial::Write for Uart<'d, T, M> {
539 fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> { 539 fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> {
540 self.blocking_write(buffer) 540 self.blocking_write(buffer)
541 } 541 }
@@ -545,7 +545,7 @@ mod eh1 {
545 } 545 }
546 } 546 }
547 547
548 impl<'d, T: Instance, M: Mode> embedded_hal_1::serial::nb::Write for Uart<'d, T, M> { 548 impl<'d, T: Instance, M: Mode> embedded_hal_nb::serial::Write for Uart<'d, T, M> {
549 fn write(&mut self, char: u8) -> nb::Result<(), Self::Error> { 549 fn write(&mut self, char: u8) -> nb::Result<(), Self::Error> {
550 self.blocking_write(&[char]).map_err(nb::Error::Other) 550 self.blocking_write(&[char]).map_err(nb::Error::Other)
551 } 551 }
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml
index a4a232f51..9566dbcaf 100644
--- a/embassy-stm32/Cargo.toml
+++ b/embassy-stm32/Cargo.toml
@@ -42,8 +42,8 @@ embassy-net = { version = "0.1.0", path = "../embassy-net", optional = true }
42embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional = true } 42embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional = true }
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.8", optional = true} 45embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9", optional = true}
46embedded-hal-async = { version = "0.1.0-alpha.1", optional = true} 46embedded-hal-async = { version = "=0.1.0-alpha.2", optional = true}
47 47
48embedded-storage = "0.3.0" 48embedded-storage = "0.3.0"
49embedded-storage-async = { version = "0.3.0", optional = true } 49embedded-storage-async = { version = "0.3.0", optional = true }
diff --git a/embassy-stm32/src/exti.rs b/embassy-stm32/src/exti.rs
index 07c96ead0..dca991859 100644
--- a/embassy-stm32/src/exti.rs
+++ b/embassy-stm32/src/exti.rs
@@ -155,7 +155,7 @@ mod eh1 {
155 type Error = Infallible; 155 type Error = Infallible;
156 } 156 }
157 157
158 impl<'d, T: GpioPin> embedded_hal_1::digital::blocking::InputPin for ExtiInput<'d, T> { 158 impl<'d, T: GpioPin> embedded_hal_1::digital::InputPin for ExtiInput<'d, T> {
159 fn is_high(&self) -> Result<bool, Self::Error> { 159 fn is_high(&self) -> Result<bool, Self::Error> {
160 Ok(self.is_high()) 160 Ok(self.is_high())
161 } 161 }
diff --git a/embassy-stm32/src/gpio.rs b/embassy-stm32/src/gpio.rs
index d794e3989..5e3346754 100644
--- a/embassy-stm32/src/gpio.rs
+++ b/embassy-stm32/src/gpio.rs
@@ -848,8 +848,7 @@ mod eh02 {
848 848
849#[cfg(feature = "unstable-traits")] 849#[cfg(feature = "unstable-traits")]
850mod eh1 { 850mod eh1 {
851 use embedded_hal_1::digital::blocking::{InputPin, OutputPin, StatefulOutputPin, ToggleableOutputPin}; 851 use embedded_hal_1::digital::{ErrorType, InputPin, OutputPin, StatefulOutputPin, ToggleableOutputPin};
852 use embedded_hal_1::digital::ErrorType;
853 852
854 use super::*; 853 use super::*;
855 854
diff --git a/embassy-stm32/src/i2c/v1.rs b/embassy-stm32/src/i2c/v1.rs
index 9dc75789a..f39a37df6 100644
--- a/embassy-stm32/src/i2c/v1.rs
+++ b/embassy-stm32/src/i2c/v1.rs
@@ -334,7 +334,7 @@ mod eh1 {
334 type Error = Error; 334 type Error = Error;
335 } 335 }
336 336
337 impl<'d, T: Instance> embedded_hal_1::i2c::blocking::I2c for I2c<'d, T> { 337 impl<'d, T: Instance> embedded_hal_1::i2c::I2c for I2c<'d, T> {
338 fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> { 338 fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> {
339 self.blocking_read(address, buffer) 339 self.blocking_read(address, buffer)
340 } 340 }
@@ -364,14 +364,14 @@ mod eh1 {
364 fn transaction<'a>( 364 fn transaction<'a>(
365 &mut self, 365 &mut self,
366 _address: u8, 366 _address: u8,
367 _operations: &mut [embedded_hal_1::i2c::blocking::Operation<'a>], 367 _operations: &mut [embedded_hal_1::i2c::Operation<'a>],
368 ) -> Result<(), Self::Error> { 368 ) -> Result<(), Self::Error> {
369 todo!(); 369 todo!();
370 } 370 }
371 371
372 fn transaction_iter<'a, O>(&mut self, _address: u8, _operations: O) -> Result<(), Self::Error> 372 fn transaction_iter<'a, O>(&mut self, _address: u8, _operations: O) -> Result<(), Self::Error>
373 where 373 where
374 O: IntoIterator<Item = embedded_hal_1::i2c::blocking::Operation<'a>>, 374 O: IntoIterator<Item = embedded_hal_1::i2c::Operation<'a>>,
375 { 375 {
376 todo!(); 376 todo!();
377 } 377 }
diff --git a/embassy-stm32/src/i2c/v2.rs b/embassy-stm32/src/i2c/v2.rs
index b7c89931c..89b52da98 100644
--- a/embassy-stm32/src/i2c/v2.rs
+++ b/embassy-stm32/src/i2c/v2.rs
@@ -883,7 +883,7 @@ mod eh1 {
883 type Error = Error; 883 type Error = Error;
884 } 884 }
885 885
886 impl<'d, T: Instance> embedded_hal_1::i2c::blocking::I2c for I2c<'d, T, NoDma, NoDma> { 886 impl<'d, T: Instance> embedded_hal_1::i2c::I2c for I2c<'d, T, NoDma, NoDma> {
887 fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> { 887 fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> {
888 self.blocking_read(address, buffer) 888 self.blocking_read(address, buffer)
889 } 889 }
@@ -913,14 +913,14 @@ mod eh1 {
913 fn transaction<'a>( 913 fn transaction<'a>(
914 &mut self, 914 &mut self,
915 _address: u8, 915 _address: u8,
916 _operations: &mut [embedded_hal_1::i2c::blocking::Operation<'a>], 916 _operations: &mut [embedded_hal_1::i2c::Operation<'a>],
917 ) -> Result<(), Self::Error> { 917 ) -> Result<(), Self::Error> {
918 todo!(); 918 todo!();
919 } 919 }
920 920
921 fn transaction_iter<'a, O>(&mut self, _address: u8, _operations: O) -> Result<(), Self::Error> 921 fn transaction_iter<'a, O>(&mut self, _address: u8, _operations: O) -> Result<(), Self::Error>
922 where 922 where
923 O: IntoIterator<Item = embedded_hal_1::i2c::blocking::Operation<'a>>, 923 O: IntoIterator<Item = embedded_hal_1::i2c::Operation<'a>>,
924 { 924 {
925 todo!(); 925 todo!();
926 } 926 }
diff --git a/embassy-stm32/src/spi/mod.rs b/embassy-stm32/src/spi/mod.rs
index 556d12305..396427782 100644
--- a/embassy-stm32/src/spi/mod.rs
+++ b/embassy-stm32/src/spi/mod.rs
@@ -843,25 +843,25 @@ mod eh1 {
843 type Error = Error; 843 type Error = Error;
844 } 844 }
845 845
846 impl<'d, T: Instance, Tx, Rx> embedded_hal_1::spi::blocking::SpiBusFlush for Spi<'d, T, Tx, Rx> { 846 impl<'d, T: Instance, Tx, Rx> embedded_hal_1::spi::SpiBusFlush for Spi<'d, T, Tx, Rx> {
847 fn flush(&mut self) -> Result<(), Self::Error> { 847 fn flush(&mut self) -> Result<(), Self::Error> {
848 Ok(()) 848 Ok(())
849 } 849 }
850 } 850 }
851 851
852 impl<'d, T: Instance, W: Word> embedded_hal_1::spi::blocking::SpiBusRead<W> for Spi<'d, T, NoDma, NoDma> { 852 impl<'d, T: Instance, W: Word> embedded_hal_1::spi::SpiBusRead<W> for Spi<'d, T, NoDma, NoDma> {
853 fn read(&mut self, words: &mut [W]) -> Result<(), Self::Error> { 853 fn read(&mut self, words: &mut [W]) -> Result<(), Self::Error> {
854 self.blocking_read(words) 854 self.blocking_read(words)
855 } 855 }
856 } 856 }
857 857
858 impl<'d, T: Instance, W: Word> embedded_hal_1::spi::blocking::SpiBusWrite<W> for Spi<'d, T, NoDma, NoDma> { 858 impl<'d, T: Instance, W: Word> embedded_hal_1::spi::SpiBusWrite<W> for Spi<'d, T, NoDma, NoDma> {
859 fn write(&mut self, words: &[W]) -> Result<(), Self::Error> { 859 fn write(&mut self, words: &[W]) -> Result<(), Self::Error> {
860 self.blocking_write(words) 860 self.blocking_write(words)
861 } 861 }
862 } 862 }
863 863
864 impl<'d, T: Instance, W: Word> embedded_hal_1::spi::blocking::SpiBus<W> for Spi<'d, T, NoDma, NoDma> { 864 impl<'d, T: Instance, W: Word> embedded_hal_1::spi::SpiBus<W> for Spi<'d, T, NoDma, NoDma> {
865 fn transfer(&mut self, read: &mut [W], write: &[W]) -> Result<(), Self::Error> { 865 fn transfer(&mut self, read: &mut [W], write: &[W]) -> Result<(), Self::Error> {
866 self.blocking_transfer(read, write) 866 self.blocking_transfer(read, write)
867 } 867 }
diff --git a/embassy-time/Cargo.toml b/embassy-time/Cargo.toml
index 6d71e100f..c3b361b8a 100644
--- a/embassy-time/Cargo.toml
+++ b/embassy-time/Cargo.toml
@@ -105,8 +105,8 @@ defmt = { version = "0.3", optional = true }
105log = { version = "0.4.14", optional = true } 105log = { version = "0.4.14", optional = true }
106 106
107embedded-hal-02 = { package = "embedded-hal", version = "0.2.6" } 107embedded-hal-02 = { package = "embedded-hal", version = "0.2.6" }
108embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true} 108embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9", optional = true}
109embedded-hal-async = { version = "0.1.0-alpha.1", optional = true} 109embedded-hal-async = { version = "=0.1.0-alpha.2", optional = true}
110 110
111futures-util = { version = "0.3.17", default-features = false } 111futures-util = { version = "0.3.17", default-features = false }
112embassy-macros = { version = "0.1.0", path = "../embassy-macros"} 112embassy-macros = { version = "0.1.0", path = "../embassy-macros"}
@@ -117,4 +117,4 @@ cfg-if = "1.0.0"
117# WASM dependencies 117# WASM dependencies
118wasm-bindgen = { version = "0.2.81", optional = true } 118wasm-bindgen = { version = "0.2.81", optional = true }
119js-sys = { version = "0.3", optional = true } 119js-sys = { version = "0.3", optional = true }
120wasm-timer = { version = "0.2.5", optional = true } \ No newline at end of file 120wasm-timer = { version = "0.2.5", optional = true }
diff --git a/embassy-time/src/delay.rs b/embassy-time/src/delay.rs
index 0a7982963..ff6b6869a 100644
--- a/embassy-time/src/delay.rs
+++ b/embassy-time/src/delay.rs
@@ -18,7 +18,7 @@ pub struct Delay;
18mod eh1 { 18mod eh1 {
19 use super::*; 19 use super::*;
20 20
21 impl embedded_hal_1::delay::blocking::DelayUs for Delay { 21 impl embedded_hal_1::delay::DelayUs for Delay {
22 type Error = core::convert::Infallible; 22 type Error = core::convert::Infallible;
23 23
24 fn delay_us(&mut self, us: u32) -> Result<(), Self::Error> { 24 fn delay_us(&mut self, us: u32) -> Result<(), Self::Error> {
diff --git a/examples/rp/src/bin/spi_display.rs b/examples/rp/src/bin/spi_display.rs
index 23cd4355e..778cad3fa 100644
--- a/examples/rp/src/bin/spi_display.rs
+++ b/examples/rp/src/bin/spi_display.rs
@@ -108,9 +108,9 @@ mod shared_spi {
108 use core::cell::RefCell; 108 use core::cell::RefCell;
109 use core::fmt::Debug; 109 use core::fmt::Debug;
110 110
111 use embedded_hal_1::digital::blocking::OutputPin; 111 use embedded_hal_1::digital::OutputPin;
112 use embedded_hal_1::spi; 112 use embedded_hal_1::spi;
113 use embedded_hal_1::spi::blocking::SpiDevice; 113 use embedded_hal_1::spi::SpiDevice;
114 114
115 #[derive(Copy, Clone, Eq, PartialEq, Debug)] 115 #[derive(Copy, Clone, Eq, PartialEq, Debug)]
116 pub enum SpiDeviceWithCsError<BUS, CS> { 116 pub enum SpiDeviceWithCsError<BUS, CS> {
@@ -153,7 +153,7 @@ mod shared_spi {
153 153
154 impl<'a, BUS, CS> SpiDevice for SpiDeviceWithCs<'a, BUS, CS> 154 impl<'a, BUS, CS> SpiDevice for SpiDeviceWithCs<'a, BUS, CS>
155 where 155 where
156 BUS: spi::blocking::SpiBusFlush, 156 BUS: spi::SpiBusFlush,
157 CS: OutputPin, 157 CS: OutputPin,
158 { 158 {
159 type Bus = BUS; 159 type Bus = BUS;
@@ -182,7 +182,7 @@ mod shared_spi {
182 182
183/// Driver for the XPT2046 resistive touchscreen sensor 183/// Driver for the XPT2046 resistive touchscreen sensor
184mod touch { 184mod touch {
185 use embedded_hal_1::spi::blocking::{SpiBus, SpiBusRead, SpiBusWrite, SpiDevice}; 185 use embedded_hal_1::spi::{SpiBus, SpiBusRead, SpiBusWrite, SpiDevice};
186 186
187 struct Calibration { 187 struct Calibration {
188 x1: i32, 188 x1: i32,
@@ -246,8 +246,8 @@ mod touch {
246 246
247mod my_display_interface { 247mod my_display_interface {
248 use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand}; 248 use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand};
249 use embedded_hal_1::digital::blocking::OutputPin; 249 use embedded_hal_1::digital::OutputPin;
250 use embedded_hal_1::spi::blocking::{SpiBusWrite, SpiDevice}; 250 use embedded_hal_1::spi::{SpiBusWrite, SpiDevice};
251 251
252 /// SPI display interface. 252 /// SPI display interface.
253 /// 253 ///
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml
index fc60d7a88..e725e03cb 100644
--- a/examples/stm32h7/Cargo.toml
+++ b/examples/stm32h7/Cargo.toml
@@ -17,8 +17,8 @@ defmt-rtt = "0.3"
17cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } 17cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
18cortex-m-rt = "0.7.0" 18cortex-m-rt = "0.7.0"
19embedded-hal = "0.2.6" 19embedded-hal = "0.2.6"
20embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } 20embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9" }
21embedded-hal-async = { version = "0.1.0-alpha.1" } 21embedded-hal-async = { version = "=0.1.0-alpha.2" }
22embedded-nal-async = "0.2.0" 22embedded-nal-async = "0.2.0"
23panic-probe = { version = "0.3", features = ["print-defmt"] } 23panic-probe = { version = "0.3", features = ["print-defmt"] }
24futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 24futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml
index 35a9c20f0..2e2d07dc3 100644
--- a/examples/stm32l4/Cargo.toml
+++ b/examples/stm32l4/Cargo.toml
@@ -18,8 +18,8 @@ defmt-rtt = "0.3"
18cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } 18cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
19cortex-m-rt = "0.7.0" 19cortex-m-rt = "0.7.0"
20embedded-hal = "0.2.6" 20embedded-hal = "0.2.6"
21embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } 21embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9" }
22embedded-hal-async = { version = "0.1.0-alpha.1" } 22embedded-hal-async = { version = "=0.1.0-alpha.2" }
23panic-probe = { version = "0.3", features = ["print-defmt"] } 23panic-probe = { version = "0.3", features = ["print-defmt"] }
24futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 24futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
25heapless = { version = "0.7.5", default-features = false } 25heapless = { version = "0.7.5", default-features = false }
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml
index 503373759..2745aef06 100644
--- a/tests/rp/Cargo.toml
+++ b/tests/rp/Cargo.toml
@@ -16,8 +16,8 @@ defmt-rtt = "0.3.0"
16cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } 16cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
17cortex-m-rt = "0.7.0" 17cortex-m-rt = "0.7.0"
18embedded-hal = "0.2.6" 18embedded-hal = "0.2.6"
19embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } 19embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9" }
20embedded-hal-async = { version = "0.1.0-alpha.1" } 20embedded-hal-async = { version = "=0.1.0-alpha.2" }
21panic-probe = { version = "0.3.0", features = ["print-defmt"] } 21panic-probe = { version = "0.3.0", features = ["print-defmt"] }
22futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 22futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
23embedded-io = { version = "0.3.0", features = ["async"] } 23embedded-io = { version = "0.3.0", features = ["async"] }
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml
index d9cd3f120..daae3d464 100644
--- a/tests/stm32/Cargo.toml
+++ b/tests/stm32/Cargo.toml
@@ -24,8 +24,8 @@ defmt-rtt = "0.3.0"
24cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } 24cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
25cortex-m-rt = "0.7.0" 25cortex-m-rt = "0.7.0"
26embedded-hal = "0.2.6" 26embedded-hal = "0.2.6"
27embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8" } 27embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9" }
28embedded-hal-async = { version = "0.1.0-alpha.1" } 28embedded-hal-async = { version = "=0.1.0-alpha.2" }
29panic-probe = { version = "0.3.0", features = ["print-defmt"] } 29panic-probe = { version = "0.3.0", features = ["print-defmt"] }
30 30
31[profile.dev] 31[profile.dev]