Enum TransceiverError

Source
pub enum TransceiverError<SpiErr, CeErr> {
    Spi(SpiErr),
    Ce(CeErr),
    Comm(u8),
    MaxRetries,
    BufferTooSmall {
        required: u8,
        actual: u8,
    },
}
Expand description

Represents all possible errors that can occur when using the nRF24L01 transceiver.

This error type is generic over the underlying SPI and CE pin error types.

Variants§

§

Spi(SpiErr)

An error occurred during SPI communication.

This typically represents a failure in the hardware communication layer, such as bus contention or device disconnection.

§

Ce(CeErr)

An error occurred when controlling the Chip Enable (CE) pin.

This could happen if the GPIO pin controlling the CE line encounters a hardware failure or configuration issue.

§

Comm(u8)

A communication error occurred with the nRF24L01 module.

The wrapped value is a status byte from the device that indicates the specific nature of the communication failure.

§

MaxRetries

The maximum number of retransmit attempts was reached without receiving an ACK.

This occurs when auto-acknowledgement is enabled and the receiver does not acknowledge receipt of the transmitted packet after the configured number of retries.

§

BufferTooSmall

The provided buffer is too small for the requested operation.

This error includes information about the required buffer size and the actual size that was provided.

Fields

§required: u8

The required buffer size in bytes

§actual: u8

The actual buffer size that was provided

Trait Implementations§

Source§

impl<SpiErr: Debug, CeErr: Debug> Debug for TransceiverError<SpiErr, CeErr>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<SpiErr, CeErr> Freeze for TransceiverError<SpiErr, CeErr>
where SpiErr: Freeze, CeErr: Freeze,

§

impl<SpiErr, CeErr> RefUnwindSafe for TransceiverError<SpiErr, CeErr>
where SpiErr: RefUnwindSafe, CeErr: RefUnwindSafe,

§

impl<SpiErr, CeErr> Send for TransceiverError<SpiErr, CeErr>
where SpiErr: Send, CeErr: Send,

§

impl<SpiErr, CeErr> Sync for TransceiverError<SpiErr, CeErr>
where SpiErr: Sync, CeErr: Sync,

§

impl<SpiErr, CeErr> Unpin for TransceiverError<SpiErr, CeErr>
where SpiErr: Unpin, CeErr: Unpin,

§

impl<SpiErr, CeErr> UnwindSafe for TransceiverError<SpiErr, CeErr>
where SpiErr: UnwindSafe, CeErr: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.