pub enum Error<SpiError> {
Spi(SpiError),
UnexpectedStatus,
InvalidResponse,
}Expand description
The error type used by this library.
This can encapsulate an SPI or GPIO error, and adds its own protocol errors on top of that.
Variants§
Spi(SpiError)
An SPI transfer failed.
UnexpectedStatus
Status register contained unexpected flags.
This can happen when the chip is faulty, incorrectly connected, or the driver wasn’t constructed or destructed properly (eg. while there is still a write in progress).
InvalidResponse
Received an invalid response from the flash memory.
Trait Implementations§
Auto Trait Implementations§
impl<SpiError> Freeze for Error<SpiError>where
SpiError: Freeze,
impl<SpiError> RefUnwindSafe for Error<SpiError>where
SpiError: RefUnwindSafe,
impl<SpiError> Send for Error<SpiError>where
SpiError: Send,
impl<SpiError> Sync for Error<SpiError>where
SpiError: Sync,
impl<SpiError> Unpin for Error<SpiError>where
SpiError: Unpin,
impl<SpiError> UnwindSafe for Error<SpiError>where
SpiError: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more