This commit is contained in:
Henrik Alsér
2022-07-10 00:49:46 +02:00
parent ce7bc32755
commit c9ceec8797
3 changed files with 28 additions and 26 deletions

View File

@ -25,7 +25,6 @@
//! let spi_dev2 = SpiBusDevice::new(spi_bus, cs_pin2);
//! let display2 = ST7735::new(spi_dev2, dc2, rst2, Default::default(), 160, 128);
//! ```
use core::fmt::Debug;
use core::future::Future;
use embassy::blocking_mutex::raw::RawMutex;
@ -56,19 +55,6 @@ where
type Error = SpiBusDeviceError<BUS::Error, CS::Error>;
}
impl<BUS, CS> spi::Error for SpiBusDeviceError<BUS, CS>
where
BUS: spi::Error + Debug,
CS: Debug,
{
fn kind(&self) -> spi::ErrorKind {
match self {
Self::Spi(e) => e.kind(),
Self::Cs(_) => spi::ErrorKind::Other,
}
}
}
impl<M, BUS, CS> spi::SpiDevice for SpiBusDevice<'_, M, BUS, CS>
where
M: RawMutex + 'static,