summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-01-19 17:29:47 +0100
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-01-19 17:59:55 +0100
commit889d757ab8bcfc10caf0a7d75ffb7733a7e71ed1 (patch)
tree70a6590ad9da8c625eb69c21faddb5721bfbcea4 /tests
parent3d27a0e7cbf226d2a9df3e2efa058589ebfca858 (diff)
downloadembassy-889d757ab8bcfc10caf0a7d75ffb7733a7e71ed1.zip
stm32/spi: expose all functionality as inherent methods.
Diffstat (limited to 'tests')
-rw-r--r--tests/stm32/src/bin/spi.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/stm32/src/bin/spi.rs b/tests/stm32/src/bin/spi.rs
index 043505c7..47d0017a 100644
--- a/tests/stm32/src/bin/spi.rs
+++ b/tests/stm32/src/bin/spi.rs
@@ -10,7 +10,6 @@ use embassy_stm32::dma::NoDma;
use embassy_stm32::spi::{self, Spi};
use embassy_stm32::time::Hertz;
use embassy_stm32::Peripherals;
-use embedded_hal::blocking::spi::Transfer;
use example_common::*;
#[embassy::main(config = "config()")]
@@ -38,7 +37,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
// Arduino pins D11 and D12 (MOSI-MISO) are connected together with a 1K resistor.
// so we should get the data we sent back.
let mut buf = data;
- spi.transfer(&mut buf).unwrap();
+ spi.blocking_transfer_in_place(&mut buf).unwrap();
assert_eq!(buf, data);
info!("Test OK");