Struct esp32_hal::spi::SPI[][src]

pub struct SPI<INSTANCE: Instance, SCLK: OutputPin, SDO: OutputPin, SDI: InputPin + OutputPin = Gpio1<Input<Floating>>, CS: OutputPin = Gpio2<Output<PushPull>>> { /* fields omitted */ }
Expand description

SPI abstraction

Implementations

Create new instance of SPI controller for SPI1

SPI1 can only use fixed pin for SCLK, SDO and SDI as they are shared with SPI0.

Create new instance of SPI controller for SPI2

Create new instance of SPI controller for SPI3

Change the SPI baudrate

Returns the current baudrate

Change the bit order

Change the data mode

Release and return the raw interface to the underlying SPI peripheral

Trait Implementations

Full-duplex implementation for writing/reading via SPI

Note: these functions do not lock the frequency of the APB bus, so transactions may be at lower frequency if APB bus is not locked in caller.

An enumeration of SPI errors

Reads the word stored in the shift register Read more

Sends a word to the slave

Error type

Sends words to the slave. Returns the words received from the slave

Error type

Sends words to the slave. Returns the words received from the slave

Error type

Sends words to the slave. Returns the words received from the slave

Error type

Sends words to the slave, ignoring all the incoming words

Error type

Sends words to the slave, ignoring all the incoming words

Error type

Sends words to the slave, ignoring all the incoming words

Error type

Sends words to the slave, ignoring all the incoming words

Error type

Sends words to the slave, ignoring all the incoming words

Error type

Sends words to the slave, ignoring all the incoming words

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

Performs the conversion.

Performs the conversion.

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.