aboutsummaryrefslogtreecommitdiff
path: root/tests/stm32/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-01-19 17:29:47 +0100
committerDario Nieuwenhuis <[email protected]>2022-01-19 17:59:55 +0100
commit889d757ab8bcfc10caf0a7d75ffb7733a7e71ed1 (patch)
tree70a6590ad9da8c625eb69c21faddb5721bfbcea4 /tests/stm32/src
parent3d27a0e7cbf226d2a9df3e2efa058589ebfca858 (diff)
stm32/spi: expose all functionality as inherent methods.
Diffstat (limited to 'tests/stm32/src')
-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 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;
10use embassy_stm32::spi::{self, Spi}; 10use embassy_stm32::spi::{self, Spi};
11use embassy_stm32::time::Hertz; 11use embassy_stm32::time::Hertz;
12use embassy_stm32::Peripherals; 12use embassy_stm32::Peripherals;
13use embedded_hal::blocking::spi::Transfer;
14use example_common::*; 13use 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");