pub enum RadioError<E> {
Spi(E),
Pin(ErrorKind),
Busy,
Absent(Status),
Bandwidth(u32),
Llcc68 {
spreading_factor: u8,
bandwidth_hz: u32,
},
Amplifier,
PayloadTooLong(usize),
BufferTooSmall(usize),
NotConfigured,
TxTimeout,
NoInterrupt,
}Expand description
What can go wrong driving an SX126x.
Variants§
Spi(E)
The SPI device failed.
Pin(ErrorKind)
The BUSY or NRESET line could not be read or driven.
Busy
BUSY stayed high for longer than BUSY_LIMIT_US allows, so the chip is stuck,
unpowered, or not wired to that line.
Absent(Status)
The chip answered GetStatus with a mode it cannot be in after a reset and SetStandby, so no SX126x, or a miswired one, is on the bus.
Bandwidth(u32)
The link settings use a bandwidth the SX126x does not offer, in hertz.
Llcc68
The board has an LLCC68, which does not support the link’s spreading factor at its bandwidth.
Fields
Amplifier
The power settings are for the other amplifier than the board has.
PayloadTooLong(usize)
A payload longer than the 255 bytes a LoRa frame carries, with its length.
BufferTooSmall(usize)
An answer or a received payload of this many bytes does not fit the buffer given.
NotConfigured
A transmission or a reception was asked for before Sx126x::configure.
TxTimeout
The chip raised its TIMEOUT interrupt before TxDone.
NoInterrupt
Neither the expected interrupt nor TIMEOUT arrived in the time the driver allows.
Trait Implementations§
Source§impl<E: Clone> Clone for RadioError<E>
impl<E: Clone> Clone for RadioError<E>
Source§fn clone(&self) -> RadioError<E>
fn clone(&self) -> RadioError<E>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<E: Copy> Copy for RadioError<E>
Source§impl<E: Debug> Debug for RadioError<E>
impl<E: Debug> Debug for RadioError<E>
Source§impl<E: Debug> Display for RadioError<E>
impl<E: Debug> Display for RadioError<E>
impl<E: Eq> Eq for RadioError<E>
Source§impl<E: Debug> Error for RadioError<E>
impl<E: Debug> Error for RadioError<E>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl<E: PartialEq> PartialEq for RadioError<E>
impl<E: PartialEq> PartialEq for RadioError<E>
Source§fn eq(&self, other: &RadioError<E>) -> bool
fn eq(&self, other: &RadioError<E>) -> bool
self and other values to be equal, and is used by ==.