pub struct Spi<SPI, PINS, const BIDI: bool = false, W = u8, OPERATION = Master> { /* private fields */ }

Implementations

Converts from 8bit dataframe to 16bit.

Converts from 16bit dataframe to 8bit.

Enable/disable spi

Select which frame format is used for data transfers

Enable interrupts for the given event:

  • Received data ready to be read (RXNE)
  • Transmit data register empty (TXE)
  • Transfer error

Disable interrupts for the given event:

  • Received data ready to be read (RXNE)
  • Transmit data register empty (TXE)
  • Transfer error

Return true if the TXE flag is set, i.e. new data to transmit can be written to the SPI.

👎Deprecated since 0.14.0: please use is_tx_empty instead

Return true if the RXNE flag is set, i.e. new data has been received and can be read from the SPI.

👎Deprecated since 0.14.0: please use is_rx_not_empty instead

Return true if the MODF flag is set, i.e. the SPI has experienced a Master Mode Fault. (see chapter 28.3.10 of the STM32F4 Reference Manual)

Returns true if the transfer is in progress

Return true if the OVR flag is set, i.e. new data has been received while the receive data register was already filled.

Trait Implementations

Formats the value using the given formatter. Read more
Error type
An enumeration of SPI errors
Reads the word stored in the shift register Read more
Sends a word to the slave
Reads the word stored in the shift register Read more
Writes a word to the slave
Write and read simultaneously. The contents of words are written to the slave, and the received words are stored into the same words buffer, overwriting it. Read more
Write and read simultaneously. write is written to the slave on MOSI and words received on MISO are stored in read. Read more
Wait until all operations have completed and the bus is idle. Read more
Read words from the slave. Read more
Write words to the slave, ignoring all the incoming words Read more
Associated error type
Execute the provided transactions
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

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.

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.