modm API documentation
|
#include <modm/platform/spi/spi_base.hpp>
Public Types | |
enum | Interrupt : uint32_t { RxBufferNotEmpty = SPI_CR2_RXNEIE, TxBufferEmpty = SPI_CR2_TXEIE, Error = SPI_CR2_ERRIE, RxDmaEnable = SPI_CR2_RXDMAEN, TxDmaEnable = SPI_CR2_TXDMAEN } |
enum | InterruptFlag : uint32_t { TxBufferEmpty = SPI_SR_TXE, RxBufferNotEmpty = SPI_SR_RXNE, CrcError = SPI_SR_CRCERR, ModeFaultError = SPI_SR_MODF, OverrunError = SPI_SR_OVR, Busy = SPI_SR_BSY, FrameFormatError = SPI_SR_FRE } |
enum | MasterSelection : uint32_t { Slave = 0, Master = SPI_CR1_MSTR, All = Master } |
enum | DataMode : uint32_t { DataMode::Mode0 = 0b00, DataMode::Mode1 = SPI_CR1_CPHA, DataMode::Mode2 = SPI_CR1_CPOL, Mode3 = SPI_CR1_CPOL | SPI_CR1_CPHA, All = Mode3 } |
enum | DataOrder : uint32_t { MsbFirst = 0b0, LsbFirst = SPI_CR1_LSBFIRST, All = LsbFirst } |
enum | DataSize : uint32_t { Bit8 = 0, Bit16 = SPI_CR1_DFF, All = Bit16 } |
enum | Prescaler : uint32_t { Div2 = 0, Div4 = SPI_CR1_BR_0, Div8 = SPI_CR1_BR_1, Div16 = SPI_CR1_BR_1 | SPI_CR1_BR_0, Div32 = SPI_CR1_BR_2, Div64 = SPI_CR1_BR_2 | SPI_CR1_BR_0, Div128 = SPI_CR1_BR_2 | SPI_CR1_BR_1, Div256 = SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0 } |
Public Member Functions | |
MODM_FLAGS32 (Interrupt) | |
MODM_FLAGS32 (InterruptFlag) | |
|
strong |