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/stm32/src/bin | |
| parent | cd36e3f7332d08865e670ca5b515d1c6efa1bf85 (diff) | |
Support unstable-trait feature for stm32
Diffstat (limited to 'tests/stm32/src/bin')
| -rw-r--r-- | tests/stm32/src/bin/spi_dma.rs | 3 |
1 files changed, 1 insertions, 2 deletions
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"); |
