|
Embedded Artistry Framework
Embedded Systems C++ Framework
|
Definitions, functions, and classes related to SPI communication bus devices. More...
Classes | |
| class | activeMaster |
| class | master |
| This class provides the SPI master interface definition. More... | |
| struct | op_t |
| SPI operation definition. More... | |
Typedefs | |
| using | ao_storage = std::pair< embvm::spi::op_t, const embvm::spi::master::cb_t > |
| using | baud_t = uint32_t |
| SPI baudrate is specified as an integral value with units Hz. More... | |
| using | status = embvm::comm::status |
| using | commBus = commBus< spi::op_t, spi::baud_t, spi::SPI_MASTER_REQD_STATIC_FUNCTION_SIZE > |
| Convenience alias for the declaration of the SPI commBus. More... | |
Enumerations | |
| enum | mode : uint8_t { mode::mode0 = 0, mode::mode1 = 1, mode::mode2 = 2, mode::mode3 = 3 } |
| SPI bus operational modes. More... | |
| enum | order : uint8_t { order::msbFirst = 0, order::lsbFirst } |
| SPI bus transmission order options. More... | |
Variables | |
| static constexpr size_t | SPI_MASTER_REQD_STATIC_FUNCTION_SIZE = 80 |
| Maximum size of the SPI master callback functor object. More... | |
| static constexpr spi::baud_t | DEFAULT_SPI_BAUD = UINT32_C(125000) |
| Default baudrate, which is used in the default constructor. More... | |
Definitions, functions, and classes related to SPI communication bus devices.
| struct embvm::spi::op_t |
SPI operation definition.
The SPI bus is full-duplex and always transmits and receives simultaneously.
A TX operation involves a valid tx_buffer pointer with rx_buffer set to nullptr.
An RX operation involves a valid rx_buffer pointer with tx_buffer set to nullptr. When tx_buffer is set to nullptr, the driver should clock out empty bytes.
An equal number of bytes are transmitted and received during a SPI transaction. The transfer size is controlled by the length argument.
| Class Members | ||
|---|---|---|
| size_t | length | Number of bytes to transfer over the bus. |
| uint8_t * | rx_buffer |
Pointer to buffer holding receive bytes. Can be set to nullptr to ignore reception. |
| uint8_t * | tx_buffer |
Pointer to buffer holding transmit bytes. Can be set to nullptr to transmit empty bytes. |
| using embvm::spi::ao_storage = typedef std::pair<embvm::spi::op_t, const embvm::spi::master::cb_t> |
| using embvm::spi::baud_t = typedef uint32_t |
SPI baudrate is specified as an integral value with units Hz.
| using embvm::spi::commBus = typedef commBus<spi::op_t, spi::baud_t, spi::SPI_MASTER_REQD_STATIC_FUNCTION_SIZE> |
Convenience alias for the declaration of the SPI commBus.
| using embvm::spi::status = typedef embvm::comm::status |
|
strong |
|
strong |
|
static |
Default baudrate, which is used in the default constructor.
|
static |
Maximum size of the SPI master callback functor object.
1.8.15