diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/stm32/src/bin/spi.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/stm32/src/bin/spi.rs b/tests/stm32/src/bin/spi.rs index 043505c7b..47d0017ac 100644 --- a/tests/stm32/src/bin/spi.rs +++ b/tests/stm32/src/bin/spi.rs | |||
| @@ -10,7 +10,6 @@ use embassy_stm32::dma::NoDma; | |||
| 10 | use embassy_stm32::spi::{self, Spi}; | 10 | use embassy_stm32::spi::{self, Spi}; |
| 11 | use embassy_stm32::time::Hertz; | 11 | use embassy_stm32::time::Hertz; |
| 12 | use embassy_stm32::Peripherals; | 12 | use embassy_stm32::Peripherals; |
| 13 | use embedded_hal::blocking::spi::Transfer; | ||
| 14 | use example_common::*; | 13 | use example_common::*; |
| 15 | 14 | ||
| 16 | #[embassy::main(config = "config()")] | 15 | #[embassy::main(config = "config()")] |
| @@ -38,7 +37,7 @@ async fn main(_spawner: Spawner, p: Peripherals) { | |||
| 38 | // Arduino pins D11 and D12 (MOSI-MISO) are connected together with a 1K resistor. | 37 | // Arduino pins D11 and D12 (MOSI-MISO) are connected together with a 1K resistor. |
| 39 | // so we should get the data we sent back. | 38 | // so we should get the data we sent back. |
| 40 | let mut buf = data; | 39 | let mut buf = data; |
| 41 | spi.transfer(&mut buf).unwrap(); | 40 | spi.blocking_transfer_in_place(&mut buf).unwrap(); |
| 42 | assert_eq!(buf, data); | 41 | assert_eq!(buf, data); |
| 43 | 42 | ||
| 44 | info!("Test OK"); | 43 | info!("Test OK"); |
