pub enum Error<SpiError> {
Spi(SpiError),
RxFifoOverflow,
TxFifoUnderflow,
CrcError,
PayloadTooLong,
InvalidChip {
part: u8,
version: u8,
},
UnexpectedState {
state: u8,
},
}Expand description
All errors that can be returned by the CC1101 driver.
Variants§
Spi(SpiError)
An error occurred on the SPI bus
RxFifoOverflow
The RX FIFO overflowed before we could read it. The driver will automatically flush the FIFO and return to IDLE.
TxFifoUnderflow
The TX FIFO underflowed during transmission.
CrcError
A packet was received but the hardware CRC check failed.
Only returned when crc_enable is set in [RadioConfig].
PayloadTooLong
The provided payload exceeds the maximum packet length. For variable-length mode, max is 61 bytes; fixed-length is set at config time.
InvalidChip
The chip did not respond correctly during initialisation. Check your SPI wiring and that the CC1101 is powered.
Fields
UnexpectedState
The chip was in an unexpected state when an operation was attempted.
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> UnsafeUnpin for Error<SpiError>where
SpiError: UnsafeUnpin,
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