Enum rppal::spi::Error [−][src]
pub enum Error {
Io(Error),
BitsPerWordNotSupported(u8),
BitOrderNotSupported(BitOrder),
ClockSpeedNotSupported(u32),
ModeNotSupported(Mode),
PolarityNotSupported(Polarity),
}
Expand description
Errors that can occur when accessing the SPI peripheral.
Variants
Io(Error)
I/O error.
Tuple Fields of Io
0: Error
BitsPerWordNotSupported(u8)
The specified number of bits per word is not supported.
The Raspberry Pi currently only supports 8 bit words. Any other value will trigger this error.
Tuple Fields of BitsPerWordNotSupported
0: u8
BitOrderNotSupported(BitOrder)
The specified bit order is not supported.
The Raspberry Pi currently only supports the MsbFirst
bit order. If you
need the LsbFirst
bit order, you can use the reverse_bits
function
instead to reverse the bit order in software by converting your write
buffer before sending it to the slave device, and your read buffer after
reading any incoming data.
Tuple Fields of BitOrderNotSupported
0: BitOrder
ClockSpeedNotSupported(u32)
The specified clock speed is not supported.
Tuple Fields of ClockSpeedNotSupported
0: u32
ModeNotSupported(Mode)
The specified mode is not supported.
Tuple Fields of ModeNotSupported
0: Mode
PolarityNotSupported(Polarity)
The specified Slave Select polarity is not supported.
Tuple Fields of PolarityNotSupported
0: Polarity