pub enum Error<SPI: Transfer<u8>, GPIO: OutputPin> {
    Spi(SPI::Error),
    Gpio(GPIO::Error),
    UnexpectedStatus,
    AddressOutOfBounds(u128),
    // some variants omitted
}
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(SPI::Error)

An SPI transfer failed.

Gpio(GPIO::Error)

A GPIO could not be set.

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).

AddressOutOfBounds(u128)

Address Out of Bounds

Tried to address memory beyond the limit of the peripheral

Trait Implementations

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.