Module spi

Source
Expand description

Support for the Serial Peripheral Interface (SPI) bus peripheral. Provides APIs to configure, read, and write from SPI, with blocking, nonblocking, and DMA functionality.

Structs§

Spi
Represents a Serial Peripheral Interface (SPI) peripheral.
SpiConfig
Configuration data for SPI.

Enums§

BaudRate
Set the factor to divide the APB clock by to set baud rate. Sets SPI_CR1 register, BR field. On H7, sets CFG1 register, MBR field.
DataSize
These bits configure the data length for SPI transfers. Sets SPI_CR2 register, DS field.
ReceptionThresh
FIFO reception threshold Sets SPI_CR2 register, FRXTH field.
SlaveSelect
Used for managing NSS / CS pin. Sets CR1 register, SSM field. On H7, sets CFG2 register, SSOE field.
SpiCommMode
Select the duplex communication mode between the 2 devices. Sets CR1 register, BIDIMODE, and RXONLY fields.
SpiError
SPI error
SpiInterrupt
Possible interrupt types. Enable these in SPIx_CR2. Check and clear with SR. There is no explicit way to clear these.