SPI Constants
This page aggregates all SPI-related constants used by functions and methods from the C and C++ APIs.
- group SPI-related constants
SPI Target Mode
Enumerations selecting the behavior of the device while acting as an SPI target.
-
enum SpiTargetModel
Device emulation model presented on the bus while in SPI target mode.
Values:
-
enumerator SPI_TARGET_MODEL_MEMORY
Full-duplex arena with an auto-incrementing pointer.
-
enumerator SPI_TARGET_MODEL_FLASH
25-series SPI-flash command set (opcode + address + data).
-
enumerator SPI_TARGET_MODEL_REGISTER_MAP
SPI-sensor convention: R/W bit + register address, then streamed.
-
enumerator SPI_TARGET_MODEL_MEMORY
-
enum SpiTargetEngine
Service engine for the MEMORY model (ignored by FLASH/REGISTER_MAP, which are always ISR-driven).
Values:
-
enumerator SPI_TARGET_ENGINE_DMA
Hardware-serviced via a gapless descriptor chain (default, fastest).
-
enumerator SPI_TARGET_ENGINE_ISR
Interrupt-serviced; frees the DMA channels for other use.
-
enumerator SPI_TARGET_ENGINE_DMA
Enums
-
enum SpiBitOrder
This enum represents the SPI bit transmission order.
Values:
-
enumerator SPI_BIT_ORDER_MSB
Most Significant Bit first
-
enumerator SPI_BIT_ORDER_LSB
Least Significant Bit first
-
enumerator SPI_BIT_ORDER_MSB
-
enum SpiMode
This enum represents the SPI clock polarity and phase modes.
Values:
-
enumerator SPI_MODE_0
CPOL = 0, CPHA = 0
-
enumerator SPI_MODE_1
CPOL = 0, CPHA = 1
-
enumerator SPI_MODE_2
CPOL = 1, CPHA = 0
-
enumerator SPI_MODE_3
CPOL = 1, CPHA = 1
-
enumerator SPI_MODE_0
-
enum SpiDataWidth
This enum represents the SPI data word size.
Values:
-
enumerator SPI_DATA_WIDTH_8_BITS
8-bit data width
-
enumerator SPI_DATA_WIDTH_16_BITS
16-bit data width
-
enumerator SPI_DATA_WIDTH_8_BITS
-
enum SpiTargetModel