diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/rp/.cargo/config.toml | 2 | ||||
| -rw-r--r-- | examples/rp/Cargo.toml | 5 | ||||
| -rw-r--r-- | examples/rp/src/bin/spi_display.rs | 158 | ||||
| -rw-r--r-- | examples/stm32f1/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/stm32h5/Cargo.toml | 4 | ||||
| -rw-r--r-- | examples/stm32h7/Cargo.toml | 4 | ||||
| -rw-r--r-- | examples/stm32l4/Cargo.toml | 4 |
7 files changed, 46 insertions, 133 deletions
diff --git a/examples/rp/.cargo/config.toml b/examples/rp/.cargo/config.toml index d1c8c1c5a..2ee6fcb00 100644 --- a/examples/rp/.cargo/config.toml +++ b/examples/rp/.cargo/config.toml | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | [target.'cfg(all(target_arch = "arm", target_os = "none"))'] | 1 | [target.'cfg(all(target_arch = "arm", target_os = "none"))'] |
| 2 | runner = "probe-run --chip RP2040" | 2 | runner = "probe-rs-cli run --chip RP2040" |
| 3 | 3 | ||
| 4 | [build] | 4 | [build] |
| 5 | target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+ | 5 | target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+ |
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index aea61eec5..63d0ac82a 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -6,6 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal", features = ["defmt"] } | ||
| 9 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } |
| 10 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 11 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 12 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| @@ -30,8 +31,8 @@ display-interface = "0.4.1" | |||
| 30 | byte-slice-cast = { version = "1.2.0", default-features = false } | 31 | byte-slice-cast = { version = "1.2.0", default-features = false } |
| 31 | smart-leds = "0.3.0" | 32 | smart-leds = "0.3.0" |
| 32 | 33 | ||
| 33 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9" } | 34 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" } |
| 34 | embedded-hal-async = "0.2.0-alpha.0" | 35 | embedded-hal-async = "0.2.0-alpha.1" |
| 35 | embedded-io = { version = "0.4.0", features = ["async", "defmt"] } | 36 | embedded-io = { version = "0.4.0", features = ["async", "defmt"] } |
| 36 | embedded-storage = { version = "0.3" } | 37 | embedded-storage = { version = "0.3" } |
| 37 | static_cell = "1.0.0" | 38 | static_cell = "1.0.0" |
diff --git a/examples/rp/src/bin/spi_display.rs b/examples/rp/src/bin/spi_display.rs index 778cad3fa..85a19ce07 100644 --- a/examples/rp/src/bin/spi_display.rs +++ b/examples/rp/src/bin/spi_display.rs | |||
| @@ -5,10 +5,13 @@ | |||
| 5 | use core::cell::RefCell; | 5 | use core::cell::RefCell; |
| 6 | 6 | ||
| 7 | use defmt::*; | 7 | use defmt::*; |
| 8 | use embassy_embedded_hal::shared_bus::blocking::spi::SpiDeviceWithConfig; | ||
| 8 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 9 | use embassy_rp::gpio::{Level, Output}; | 10 | use embassy_rp::gpio::{Level, Output}; |
| 10 | use embassy_rp::spi; | 11 | use embassy_rp::spi; |
| 11 | use embassy_rp::spi::{Blocking, Spi}; | 12 | use embassy_rp::spi::{Blocking, Spi}; |
| 13 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; | ||
| 14 | use embassy_sync::blocking_mutex::Mutex; | ||
| 12 | use embassy_time::Delay; | 15 | use embassy_time::Delay; |
| 13 | use embedded_graphics::image::{Image, ImageRawLE}; | 16 | use embedded_graphics::image::{Image, ImageRawLE}; |
| 14 | use embedded_graphics::mono_font::ascii::FONT_10X20; | 17 | use embedded_graphics::mono_font::ascii::FONT_10X20; |
| @@ -21,10 +24,9 @@ use st7789::{Orientation, ST7789}; | |||
| 21 | use {defmt_rtt as _, panic_probe as _}; | 24 | use {defmt_rtt as _, panic_probe as _}; |
| 22 | 25 | ||
| 23 | use crate::my_display_interface::SPIDeviceInterface; | 26 | use crate::my_display_interface::SPIDeviceInterface; |
| 24 | use crate::shared_spi::SpiDeviceWithCs; | ||
| 25 | use crate::touch::Touch; | 27 | use crate::touch::Touch; |
| 26 | 28 | ||
| 27 | //const DISPLAY_FREQ: u32 = 64_000_000; | 29 | const DISPLAY_FREQ: u32 = 64_000_000; |
| 28 | const TOUCH_FREQ: u32 = 200_000; | 30 | const TOUCH_FREQ: u32 = 200_000; |
| 29 | 31 | ||
| 30 | #[embassy_executor::main] | 32 | #[embassy_executor::main] |
| @@ -43,16 +45,20 @@ async fn main(_spawner: Spawner) { | |||
| 43 | //let touch_irq = p.PIN_17; | 45 | //let touch_irq = p.PIN_17; |
| 44 | 46 | ||
| 45 | // create SPI | 47 | // create SPI |
| 46 | let mut config = spi::Config::default(); | 48 | let mut display_config = spi::Config::default(); |
| 47 | config.frequency = TOUCH_FREQ; // use the lowest freq | 49 | display_config.frequency = DISPLAY_FREQ; |
| 48 | config.phase = spi::Phase::CaptureOnSecondTransition; | 50 | display_config.phase = spi::Phase::CaptureOnSecondTransition; |
| 49 | config.polarity = spi::Polarity::IdleHigh; | 51 | display_config.polarity = spi::Polarity::IdleHigh; |
| 52 | let mut touch_config = spi::Config::default(); | ||
| 53 | touch_config.frequency = TOUCH_FREQ; | ||
| 54 | touch_config.phase = spi::Phase::CaptureOnSecondTransition; | ||
| 55 | touch_config.polarity = spi::Polarity::IdleHigh; | ||
| 50 | 56 | ||
| 51 | let spi: Spi<'_, _, Blocking> = Spi::new_blocking(p.SPI1, clk, mosi, miso, config); | 57 | let spi: Spi<'_, _, Blocking> = Spi::new_blocking(p.SPI1, clk, mosi, miso, touch_config.clone()); |
| 52 | let spi_bus = RefCell::new(spi); | 58 | let spi_bus: Mutex<NoopRawMutex, _> = Mutex::new(RefCell::new(spi)); |
| 53 | 59 | ||
| 54 | let display_spi = SpiDeviceWithCs::new(&spi_bus, Output::new(display_cs, Level::High)); | 60 | let display_spi = SpiDeviceWithConfig::new(&spi_bus, Output::new(display_cs, Level::High), display_config); |
| 55 | let touch_spi = SpiDeviceWithCs::new(&spi_bus, Output::new(touch_cs, Level::High)); | 61 | let touch_spi = SpiDeviceWithConfig::new(&spi_bus, Output::new(touch_cs, Level::High), touch_config); |
| 56 | 62 | ||
| 57 | let mut touch = Touch::new(touch_spi); | 63 | let mut touch = Touch::new(touch_spi); |
| 58 | 64 | ||
| @@ -104,85 +110,9 @@ async fn main(_spawner: Spawner) { | |||
| 104 | } | 110 | } |
| 105 | } | 111 | } |
| 106 | 112 | ||
| 107 | mod shared_spi { | ||
| 108 | use core::cell::RefCell; | ||
| 109 | use core::fmt::Debug; | ||
| 110 | |||
| 111 | use embedded_hal_1::digital::OutputPin; | ||
| 112 | use embedded_hal_1::spi; | ||
| 113 | use embedded_hal_1::spi::SpiDevice; | ||
| 114 | |||
| 115 | #[derive(Copy, Clone, Eq, PartialEq, Debug)] | ||
| 116 | pub enum SpiDeviceWithCsError<BUS, CS> { | ||
| 117 | #[allow(unused)] // will probably use in the future when adding a flush() to SpiBus | ||
| 118 | Spi(BUS), | ||
| 119 | Cs(CS), | ||
| 120 | } | ||
| 121 | |||
| 122 | impl<BUS, CS> spi::Error for SpiDeviceWithCsError<BUS, CS> | ||
| 123 | where | ||
| 124 | BUS: spi::Error + Debug, | ||
| 125 | CS: Debug, | ||
| 126 | { | ||
| 127 | fn kind(&self) -> spi::ErrorKind { | ||
| 128 | match self { | ||
| 129 | Self::Spi(e) => e.kind(), | ||
| 130 | Self::Cs(_) => spi::ErrorKind::Other, | ||
| 131 | } | ||
| 132 | } | ||
| 133 | } | ||
| 134 | |||
| 135 | pub struct SpiDeviceWithCs<'a, BUS, CS> { | ||
| 136 | bus: &'a RefCell<BUS>, | ||
| 137 | cs: CS, | ||
| 138 | } | ||
| 139 | |||
| 140 | impl<'a, BUS, CS> SpiDeviceWithCs<'a, BUS, CS> { | ||
| 141 | pub fn new(bus: &'a RefCell<BUS>, cs: CS) -> Self { | ||
| 142 | Self { bus, cs } | ||
| 143 | } | ||
| 144 | } | ||
| 145 | |||
| 146 | impl<'a, BUS, CS> spi::ErrorType for SpiDeviceWithCs<'a, BUS, CS> | ||
| 147 | where | ||
| 148 | BUS: spi::ErrorType, | ||
| 149 | CS: OutputPin, | ||
| 150 | { | ||
| 151 | type Error = SpiDeviceWithCsError<BUS::Error, CS::Error>; | ||
| 152 | } | ||
| 153 | |||
| 154 | impl<'a, BUS, CS> SpiDevice for SpiDeviceWithCs<'a, BUS, CS> | ||
| 155 | where | ||
| 156 | BUS: spi::SpiBusFlush, | ||
| 157 | CS: OutputPin, | ||
| 158 | { | ||
| 159 | type Bus = BUS; | ||
| 160 | |||
| 161 | fn transaction<R>( | ||
| 162 | &mut self, | ||
| 163 | f: impl FnOnce(&mut Self::Bus) -> Result<R, BUS::Error>, | ||
| 164 | ) -> Result<R, Self::Error> { | ||
| 165 | let mut bus = self.bus.borrow_mut(); | ||
| 166 | self.cs.set_low().map_err(SpiDeviceWithCsError::Cs)?; | ||
| 167 | |||
| 168 | let f_res = f(&mut bus); | ||
| 169 | |||
| 170 | // On failure, it's important to still flush and deassert CS. | ||
| 171 | let flush_res = bus.flush(); | ||
| 172 | let cs_res = self.cs.set_high(); | ||
| 173 | |||
| 174 | let f_res = f_res.map_err(SpiDeviceWithCsError::Spi)?; | ||
| 175 | flush_res.map_err(SpiDeviceWithCsError::Spi)?; | ||
| 176 | cs_res.map_err(SpiDeviceWithCsError::Cs)?; | ||
| 177 | |||
| 178 | Ok(f_res) | ||
| 179 | } | ||
| 180 | } | ||
| 181 | } | ||
| 182 | |||
| 183 | /// Driver for the XPT2046 resistive touchscreen sensor | 113 | /// Driver for the XPT2046 resistive touchscreen sensor |
| 184 | mod touch { | 114 | mod touch { |
| 185 | use embedded_hal_1::spi::{SpiBus, SpiBusRead, SpiBusWrite, SpiDevice}; | 115 | use embedded_hal_1::spi::{Operation, SpiDevice}; |
| 186 | 116 | ||
| 187 | struct Calibration { | 117 | struct Calibration { |
| 188 | x1: i32, | 118 | x1: i32, |
| @@ -209,7 +139,6 @@ mod touch { | |||
| 209 | impl<SPI> Touch<SPI> | 139 | impl<SPI> Touch<SPI> |
| 210 | where | 140 | where |
| 211 | SPI: SpiDevice, | 141 | SPI: SpiDevice, |
| 212 | SPI::Bus: SpiBus, | ||
| 213 | { | 142 | { |
| 214 | pub fn new(spi: SPI) -> Self { | 143 | pub fn new(spi: SPI) -> Self { |
| 215 | Self { spi } | 144 | Self { spi } |
| @@ -219,13 +148,12 @@ mod touch { | |||
| 219 | let mut x = [0; 2]; | 148 | let mut x = [0; 2]; |
| 220 | let mut y = [0; 2]; | 149 | let mut y = [0; 2]; |
| 221 | self.spi | 150 | self.spi |
| 222 | .transaction(|bus| { | 151 | .transaction(&mut [ |
| 223 | bus.write(&[0x90])?; | 152 | Operation::Write(&[0x90]), |
| 224 | bus.read(&mut x)?; | 153 | Operation::Read(&mut x), |
| 225 | bus.write(&[0xd0])?; | 154 | Operation::Write(&[0xd0]), |
| 226 | bus.read(&mut y)?; | 155 | Operation::Read(&mut y), |
| 227 | Ok(()) | 156 | ]) |
| 228 | }) | ||
| 229 | .unwrap(); | 157 | .unwrap(); |
| 230 | 158 | ||
| 231 | let x = (u16::from_be_bytes(x) >> 3) as i32; | 159 | let x = (u16::from_be_bytes(x) >> 3) as i32; |
| @@ -247,7 +175,7 @@ mod touch { | |||
| 247 | mod my_display_interface { | 175 | mod my_display_interface { |
| 248 | use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand}; | 176 | use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand}; |
| 249 | use embedded_hal_1::digital::OutputPin; | 177 | use embedded_hal_1::digital::OutputPin; |
| 250 | use embedded_hal_1::spi::{SpiBusWrite, SpiDevice}; | 178 | use embedded_hal_1::spi::SpiDeviceWrite; |
| 251 | 179 | ||
| 252 | /// SPI display interface. | 180 | /// SPI display interface. |
| 253 | /// | 181 | /// |
| @@ -259,8 +187,7 @@ mod my_display_interface { | |||
| 259 | 187 | ||
| 260 | impl<SPI, DC> SPIDeviceInterface<SPI, DC> | 188 | impl<SPI, DC> SPIDeviceInterface<SPI, DC> |
| 261 | where | 189 | where |
| 262 | SPI: SpiDevice, | 190 | SPI: SpiDeviceWrite, |
| 263 | SPI::Bus: SpiBusWrite, | ||
| 264 | DC: OutputPin, | 191 | DC: OutputPin, |
| 265 | { | 192 | { |
| 266 | /// Create new SPI interface for communciation with a display driver | 193 | /// Create new SPI interface for communciation with a display driver |
| @@ -271,42 +198,27 @@ mod my_display_interface { | |||
| 271 | 198 | ||
| 272 | impl<SPI, DC> WriteOnlyDataCommand for SPIDeviceInterface<SPI, DC> | 199 | impl<SPI, DC> WriteOnlyDataCommand for SPIDeviceInterface<SPI, DC> |
| 273 | where | 200 | where |
| 274 | SPI: SpiDevice, | 201 | SPI: SpiDeviceWrite, |
| 275 | SPI::Bus: SpiBusWrite, | ||
| 276 | DC: OutputPin, | 202 | DC: OutputPin, |
| 277 | { | 203 | { |
| 278 | fn send_commands(&mut self, cmds: DataFormat<'_>) -> Result<(), DisplayError> { | 204 | fn send_commands(&mut self, cmds: DataFormat<'_>) -> Result<(), DisplayError> { |
| 279 | let r = self.spi.transaction(|bus| { | 205 | // 1 = data, 0 = command |
| 280 | // 1 = data, 0 = command | 206 | self.dc.set_low().map_err(|_| DisplayError::DCError)?; |
| 281 | if let Err(_) = self.dc.set_low() { | ||
| 282 | return Ok(Err(DisplayError::DCError)); | ||
| 283 | } | ||
| 284 | |||
| 285 | // Send words over SPI | ||
| 286 | send_u8(bus, cmds)?; | ||
| 287 | 207 | ||
| 288 | Ok(Ok(())) | 208 | send_u8(&mut self.spi, cmds).map_err(|_| DisplayError::BusWriteError)?; |
| 289 | }); | 209 | Ok(()) |
| 290 | r.map_err(|_| DisplayError::BusWriteError)? | ||
| 291 | } | 210 | } |
| 292 | 211 | ||
| 293 | fn send_data(&mut self, buf: DataFormat<'_>) -> Result<(), DisplayError> { | 212 | fn send_data(&mut self, buf: DataFormat<'_>) -> Result<(), DisplayError> { |
| 294 | let r = self.spi.transaction(|bus| { | 213 | // 1 = data, 0 = command |
| 295 | // 1 = data, 0 = command | 214 | self.dc.set_high().map_err(|_| DisplayError::DCError)?; |
| 296 | if let Err(_) = self.dc.set_high() { | ||
| 297 | return Ok(Err(DisplayError::DCError)); | ||
| 298 | } | ||
| 299 | |||
| 300 | // Send words over SPI | ||
| 301 | send_u8(bus, buf)?; | ||
| 302 | 215 | ||
| 303 | Ok(Ok(())) | 216 | send_u8(&mut self.spi, buf).map_err(|_| DisplayError::BusWriteError)?; |
| 304 | }); | 217 | Ok(()) |
| 305 | r.map_err(|_| DisplayError::BusWriteError)? | ||
| 306 | } | 218 | } |
| 307 | } | 219 | } |
| 308 | 220 | ||
| 309 | fn send_u8<T: SpiBusWrite>(spi: &mut T, words: DataFormat<'_>) -> Result<(), T::Error> { | 221 | fn send_u8<T: SpiDeviceWrite>(spi: &mut T, words: DataFormat<'_>) -> Result<(), T::Error> { |
| 310 | match words { | 222 | match words { |
| 311 | DataFormat::U8(slice) => spi.write(slice), | 223 | DataFormat::U8(slice) => spi.write(slice), |
| 312 | DataFormat::U16(slice) => { | 224 | DataFormat::U16(slice) => { |
diff --git a/examples/stm32f1/Cargo.toml b/examples/stm32f1/Cargo.toml index 387af783a..99f37cdda 100644 --- a/examples/stm32f1/Cargo.toml +++ b/examples/stm32f1/Cargo.toml | |||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | |||
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any", "unstable-traits" ] } |
| 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
| 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 14 | 14 | ||
diff --git a/examples/stm32h5/Cargo.toml b/examples/stm32h5/Cargo.toml index 70702863f..f240c3896 100644 --- a/examples/stm32h5/Cargo.toml +++ b/examples/stm32h5/Cargo.toml | |||
| @@ -19,8 +19,8 @@ defmt-rtt = "0.4" | |||
| 19 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } | 19 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 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-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9" } | 22 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" } |
| 23 | embedded-hal-async = { version = "=0.2.0-alpha.0" } | 23 | embedded-hal-async = { version = "=0.2.0-alpha.1" } |
| 24 | embedded-nal-async = "0.4.0" | 24 | embedded-nal-async = "0.4.0" |
| 25 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 25 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 26 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 26 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index d0d6a9497..154f5a987 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml | |||
| @@ -19,8 +19,8 @@ defmt-rtt = "0.4" | |||
| 19 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } | 19 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 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-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9" } | 22 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" } |
| 23 | embedded-hal-async = { version = "=0.2.0-alpha.0" } | 23 | embedded-hal-async = { version = "=0.2.0-alpha.1" } |
| 24 | embedded-nal-async = "0.4.0" | 24 | embedded-nal-async = "0.4.0" |
| 25 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 25 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 26 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 26 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml index 7c254eba3..fa39df6db 100644 --- a/examples/stm32l4/Cargo.toml +++ b/examples/stm32l4/Cargo.toml | |||
| @@ -18,8 +18,8 @@ defmt-rtt = "0.4" | |||
| 18 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } | 18 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 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-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9" } | 21 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" } |
| 22 | embedded-hal-async = { version = "=0.2.0-alpha.0" } | 22 | embedded-hal-async = { version = "=0.2.0-alpha.1" } |
| 23 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 23 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 24 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 24 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 25 | heapless = { version = "0.7.5", default-features = false } | 25 | heapless = { version = "0.7.5", default-features = false } |
