Struct stm32f7xx_hal::spi::Spi[][src]

pub struct Spi<I, P, State> { /* fields omitted */ }
Expand description

Entry point to the SPI API

Implementations

Create a new instance of the SPI API

Initialize the SPI peripheral

Start an SPI transfer using DMA

Sends the data in buffer and writes the received data into buffer right after. Returns a Transfer, to represent the ongoing SPI transfer.

Please note that the word “transfer” is used with two different meanings here:

  • An SPI transfer, as in an SPI transaction that involves both sending and receiving data. The method name refers to this kind of transfer.
  • A DMA transfer, as in an ongoing DMA operation. The name of the return type refers to this kind of transfer.

This method, as well as all other DMA-related methods in this module, requires references to two DMA handles, one each for the RX and TX streams. This will actually always be the same handle, as each SPI instance uses the same DMA instance for both sending and receiving. It would be nice to simplify that, but I believe that requires an equality constraint in the where clause, which is not supported yet by the compiler.

Destroy the peripheral API and return a raw SPI peripheral instance

Trait Implementations

An enumeration of SPI errors

Reads the word stored in the shift register Read more

Sends a word to the slave

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.

Should always be Self

Error type

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

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.

Error type

Sends words to the slave, ignoring all the incoming words

Error type

Sends words to the slave, ignoring all the incoming words