diff options
Diffstat (limited to 'tests/stm32/src')
| -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"); |
