diff options
| author | Ulf Lilleengen <[email protected]> | 2022-01-26 22:39:06 +0100 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2022-01-26 22:39:06 +0100 |
| commit | 4032fc06556312eab27488f05efe1803ade47b45 (patch) | |
| tree | 0b38343758741e5c4074e86da30867595501f9b6 /tests | |
| parent | cd36e3f7332d08865e670ca5b515d1c6efa1bf85 (diff) | |
Support unstable-trait feature for stm32
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/stm32/Cargo.toml | 1 | ||||
| -rw-r--r-- | tests/stm32/src/bin/spi_dma.rs | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml index dc66d08c0..63bfb9d22 100644 --- a/tests/stm32/Cargo.toml +++ b/tests/stm32/Cargo.toml | |||
| @@ -23,6 +23,7 @@ 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 = "embassy"} | ||
| 26 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } | 27 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } |
| 27 | 28 | ||
| 28 | [profile.dev] | 29 | [profile.dev] |
diff --git a/tests/stm32/src/bin/spi_dma.rs b/tests/stm32/src/bin/spi_dma.rs index 1a827b434..bf682e097 100644 --- a/tests/stm32/src/bin/spi_dma.rs +++ b/tests/stm32/src/bin/spi_dma.rs | |||
| @@ -9,7 +9,6 @@ use embassy::executor::Spawner; | |||
| 9 | use embassy_stm32::spi::{self, Spi}; | 9 | use embassy_stm32::spi::{self, Spi}; |
| 10 | use embassy_stm32::time::Hertz; | 10 | use embassy_stm32::time::Hertz; |
| 11 | use embassy_stm32::Peripherals; | 11 | use embassy_stm32::Peripherals; |
| 12 | use embassy_traits::spi::FullDuplex; | ||
| 13 | use example_common::*; | 12 | use example_common::*; |
| 14 | 13 | ||
| 15 | #[embassy::main(config = "config()")] | 14 | #[embassy::main(config = "config()")] |
| @@ -43,7 +42,7 @@ async fn main(_spawner: Spawner, p: Peripherals) { | |||
| 43 | // Arduino pins D11 and D12 (MOSI-MISO) are connected together with a 1K resistor. | 42 | // Arduino pins D11 and D12 (MOSI-MISO) are connected together with a 1K resistor. |
| 44 | // so we should get the data we sent back. | 43 | // so we should get the data we sent back. |
| 45 | let mut buf = [0; 9]; | 44 | let mut buf = [0; 9]; |
| 46 | spi.read_write(&mut buf, &data).await.unwrap(); | 45 | spi.transfer(&mut buf, &data).await.unwrap(); |
| 47 | assert_eq!(buf, data); | 46 | assert_eq!(buf, data); |
| 48 | 47 | ||
| 49 | info!("Test OK"); | 48 | info!("Test OK"); |
