Support unstable-trait feature for stm32
This commit is contained in:
@ -10,7 +10,6 @@ use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
|
||||
use embassy_stm32::spi::{Config, Spi};
|
||||
use embassy_stm32::time::Hertz;
|
||||
use embassy_stm32::Peripherals;
|
||||
use embassy_traits::spi::FullDuplex;
|
||||
use example_common::*;
|
||||
|
||||
#[embassy::main]
|
||||
@ -47,7 +46,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
|
||||
let write = [0x0A; 10];
|
||||
let mut read = [0; 10];
|
||||
cs.set_low();
|
||||
spi.read_write(&mut read, &write).await.ok();
|
||||
spi.transfer(&mut read, &write).await.ok();
|
||||
cs.set_high();
|
||||
info!("xfer {=[u8]:x}", read);
|
||||
}
|
||||
|
Reference in New Issue
Block a user