summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorUlf Lilleengen <lulf@redhat.com>2022-01-26 22:39:06 +0100
committerUlf Lilleengen <lulf@redhat.com>2022-01-26 22:39:06 +0100
commit4032fc06556312eab27488f05efe1803ade47b45 (patch)
tree0b38343758741e5c4074e86da30867595501f9b6 /tests
parentcd36e3f7332d08865e670ca5b515d1c6efa1bf85 (diff)
downloadembassy-4032fc06556312eab27488f05efe1803ade47b45.zip
Support unstable-trait feature for stm32
Diffstat (limited to 'tests')
-rw-r--r--tests/stm32/Cargo.toml1
-rw-r--r--tests/stm32/src/bin/spi_dma.rs3
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml
index dc66d08c..63bfb9d2 100644
--- a/tests/stm32/Cargo.toml
+++ b/tests/stm32/Cargo.toml
@@ -23,6 +23,7 @@ defmt-rtt = "0.3.0"
cortex-m = "0.7.3"
cortex-m-rt = "0.7.0"
embedded-hal = "0.2.6"
+embedded-hal-async = { version = "0.0.1", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy"}
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
[profile.dev]
diff --git a/tests/stm32/src/bin/spi_dma.rs b/tests/stm32/src/bin/spi_dma.rs
index 1a827b43..bf682e09 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;
use embassy_stm32::spi::{self, Spi};
use embassy_stm32::time::Hertz;
use embassy_stm32::Peripherals;
-use embassy_traits::spi::FullDuplex;
use example_common::*;
#[embassy::main(config = "config()")]
@@ -43,7 +42,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 = [0; 9];
- spi.read_write(&mut buf, &data).await.unwrap();
+ spi.transfer(&mut buf, &data).await.unwrap();
assert_eq!(buf, data);
info!("Test OK");