rp: impl eh1.0 blocking traits
This commit is contained in:
@ -34,7 +34,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
|
||||
loop {
|
||||
cs.set_low();
|
||||
let mut buf = [0x90, 0x00, 0x00, 0xd0, 0x00, 0x00];
|
||||
spi.transfer(&mut buf);
|
||||
spi.blocking_transfer_in_place(&mut buf).unwrap();
|
||||
cs.set_high();
|
||||
|
||||
let x = (buf[1] as u32) << 5 | (buf[2] as u32) >> 3;
|
||||
|
@ -131,7 +131,7 @@ impl<'a> embedded_hal::blocking::spi::Write<u8> for DisplaySpi<'a> {
|
||||
this.display_cs.set_low();
|
||||
this.last_mode = SpiMode::Display;
|
||||
}
|
||||
this.spi.write(words);
|
||||
this.spi.write(words).unwrap();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@ -147,7 +147,7 @@ impl<'a> embedded_hal::blocking::spi::Transfer<u8> for TouchSpi<'a> {
|
||||
this.display_cs.set_high();
|
||||
this.last_mode = SpiMode::Touch;
|
||||
}
|
||||
this.spi.transfer(words);
|
||||
this.spi.transfer(words).unwrap();
|
||||
Ok(words)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user