pub enum Error<SPI, CS> where
SPI: Transfer<u8> + Write<u8>,
CS: OutputPin, {
Show 19 variants
Spi(Error<SPI, CS>),
Fcs,
Phy,
BufferTooSmall {
required_len: usize,
},
ReedSolomon,
FrameWaitTimeout,
Overrun,
PreambleDetectionTimeout,
SfdTimeout,
FrameFilteringRejection,
Frame(Error),
DelayedSendTooLate,
DelayedSendPowerUpWarning,
Ssmarshal(Error),
InvalidConfiguration,
RxNotFinished,
StillAsleep,
BadRssiCalculation,
RxConfigFrameFilteringUnsupported,
}Expand description
An error that can occur when sending or receiving data
Variants
Spi(Error<SPI, CS>)
Error occured while using SPI bus
Fcs
Receiver FCS error
Phy
PHY header error
BufferTooSmall
Fields
required_len: usizeIndicates how large a buffer would have been required
Buffer too small
ReedSolomon
Receiver Reed Solomon Frame Sync Loss
FrameWaitTimeout
Receiver Frame Wait Timeout
Overrun
Receiver Overrun
PreambleDetectionTimeout
Preamble Detection Timeout
SfdTimeout
Receiver SFD Timeout
FrameFilteringRejection
Frame was rejected because due to automatic frame filtering
It seems that frame filtering is typically handled transparently by the hardware, and filtered frames aren’t usually visible to the driver. However, sometimes a filtered frame bubbles up and disrupts an ongoing receive operation, which then causes this error.
Frame(Error)
Frame could not be decoded
DelayedSendTooLate
A delayed frame could not be sent in time
Please note that the frame was still sent. Replies could still arrive, and if it was a ranging frame, the resulting range measurement will be wrong.
DelayedSendPowerUpWarning
Transmitter could not power up in time for delayed send
The frame was still transmitted, but the first bytes of the preamble were likely corrupted.
Ssmarshal(Error)
An error occured while serializing or deserializing data
InvalidConfiguration
The configuration was not valid. Some combinations of settings are not allowed.
RxNotFinished
The receive operation hasn’t finished yet
StillAsleep
It was expected that the radio would have woken up, but it hasn’t.
BadRssiCalculation
The RSSI was not calculable.
RxConfigFrameFilteringUnsupported
There are issues with frame filtering in double buffer mode. So it’s not supported now.
Trait Implementations
sourceimpl<SPI, CS> Debug for Error<SPI, CS> where
SPI: Transfer<u8> + Write<u8>,
<SPI as Transfer<u8>>::Error: Debug,
<SPI as Write<u8>>::Error: Debug,
CS: OutputPin,
<CS as OutputPin>::Error: Debug,
impl<SPI, CS> Debug for Error<SPI, CS> where
SPI: Transfer<u8> + Write<u8>,
<SPI as Transfer<u8>>::Error: Debug,
<SPI as Write<u8>>::Error: Debug,
CS: OutputPin,
<CS as OutputPin>::Error: Debug,
Auto Trait Implementations
impl<SPI, CS> RefUnwindSafe for Error<SPI, CS> where
<CS as OutputPin>::Error: RefUnwindSafe,
<SPI as Transfer<u8>>::Error: RefUnwindSafe,
<SPI as Write<u8>>::Error: RefUnwindSafe,
impl<SPI, CS> Send for Error<SPI, CS> where
<CS as OutputPin>::Error: Send,
<SPI as Transfer<u8>>::Error: Send,
<SPI as Write<u8>>::Error: Send,
impl<SPI, CS> Sync for Error<SPI, CS> where
<CS as OutputPin>::Error: Sync,
<SPI as Transfer<u8>>::Error: Sync,
<SPI as Write<u8>>::Error: Sync,
impl<SPI, CS> Unpin for Error<SPI, CS> where
<CS as OutputPin>::Error: Unpin,
<SPI as Transfer<u8>>::Error: Unpin,
<SPI as Write<u8>>::Error: Unpin,
impl<SPI, CS> UnwindSafe for Error<SPI, CS> where
<CS as OutputPin>::Error: UnwindSafe,
<SPI as Transfer<u8>>::Error: UnwindSafe,
<SPI as Write<u8>>::Error: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
sourcefn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
sourceimpl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
sourcefn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
OverflowingCasts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
UnwrappedCasts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
WrappingCasts the value.