# CMSIS SPI Driver

CMSIS SPI Driver Reference.

## Summary

Typedefs

- ARM_SPI_STATUS : SPI Status .
- ARM_SPI_SignalEvent_t : Pointer to ARM_SPI_SignalEvent : Signal SPI Event.
- ARM_SPI_CAPABILITIES : SPI Driver Capabilities.
- ARM_DRIVER_SPI : Access structure of the SPI Driver.

Data Structures

- _ARM_SPI_STATUS : SPI Status .
- _ARM_SPI_CAPABILITIES : SPI Driver Capabilities.
- _ARM_DRIVER_SPI : Access structure of the SPI Driver.

Macros

- ARM_SPI_API_VERSION : SPI API version.
- ARM_SPI_CONTROL_Pos : Position of the 0th bit of the SPI Control field in the ARM_SPI structure.
- ARM_SPI_CONTROL_Msk : Positioning of SPI Control field in the ARM_SPI structure.
- ARM_SPI_MODE_INACTIVE : SPI Inactive.
- ARM_SPI_MODE_MASTER : SPI Master (Output on MOSI, Input on MISO); arg = Bus Speed in bps.
- ARM_SPI_MODE_SLAVE : SPI Slave (Output on MISO, Input on MOSI).
- ARM_SPI_MODE_MASTER_SIMPLEX : SPI Master (Output/Input on MOSI); arg = Bus Speed in bps.
- ARM_SPI_MODE_SLAVE_SIMPLEX : SPI Slave (Output/Input on MISO).
- ARM_SPI_FRAME_FORMAT_Pos : Position of the 0th bit of the Frame format field in the ARM_SPI structure.
- ARM_SPI_FRAME_FORMAT_Msk : Positioning of Frame format field in the ARM_SPI structure.
- ARM_SPI_CPOL0_CPHA0 : Clock Polarity 0, Clock Phase 0 (default).
- ARM_SPI_CPOL0_CPHA1 : Clock Polarity 0, Clock Phase 1.
- ARM_SPI_CPOL1_CPHA0 : Clock Polarity 1, Clock Phase 0.
- ARM_SPI_CPOL1_CPHA1 : Clock Polarity 1, Clock Phase 1.
- ARM_SPI_TI_SSI : Texas Instruments Frame Format.
- ARM_SPI_MICROWIRE : National Microwire Frame Format.
- ARM_SPI_DATA_BITS_Pos : Position of the 0th bit of the Data bits field in the ARM_SPI structure.
- ARM_SPI_DATA_BITS_Msk : Positioning of the Data bits field in the ARM_SPI structure.
- ARM_SPI_DATA_BITS : Number of Data bits.
- ARM_SPI_BIT_ORDER_Pos : Position of the 0th bit of the Bit order field in the ARM_SPI structure.
- ARM_SPI_BIT_ORDER_Msk : Positioning of the Bit order field in the ARM_SPI structure.
- ARM_SPI_MSB_LSB : SPI Bit order from MSB to LSB (default).
- ARM_SPI_LSB_MSB : SPI Bit order from LSB to MSB.
- ARM_SPI_SS_MASTER_MODE_Pos : Position of the 0th bit of the Slave Select Master Mode field in the ARM_SPI structure.
- ARM_SPI_SS_MASTER_MODE_Msk : Positioning of the Slave Select Master Mode field in the ARM_SPI structure.
- ARM_SPI_SS_MASTER_UNUSED : SPI Slave Select when Master: Not used (default).
- ARM_SPI_SS_MASTER_SW : SPI Slave Select when Master: Software controlled.
- ARM_SPI_SS_MASTER_HW_OUTPUT : SPI Slave Select when Master: Hardware controlled Output.
- ARM_SPI_SS_MASTER_HW_INPUT : SPI Slave Select when Master: Hardware monitored Input.
- ARM_SPI_SS_SLAVE_MODE_Pos : Position of the 0th bit of the Slave Select Slave Mode field in the ARM_SPI structure.
- ARM_SPI_SS_SLAVE_MODE_Msk : Positioning of the Slave Select Slave mode field in the ARM_SPI structure.
- ARM_SPI_SS_SLAVE_HW : SPI Slave Select when Slave: Hardware monitored (default).
- ARM_SPI_SS_SLAVE_SW : SPI Slave Select when Slave: Software controlled.
- ARM_SPI_SET_BUS_SPEED : Set Bus Speed in bps; arg = value.
- ARM_SPI_GET_BUS_SPEED : Get Bus Speed in bps.
- ARM_SPI_SET_DEFAULT_TX_VALUE : Set default Transmit value; arg = value.
- ARM_SPI_CONTROL_SS : Control Slave Select; arg: 0=inactive, 1=active.
- ARM_SPI_ABORT_TRANSFER : Abort current data transfer.
- ARM_SPI_SS_INACTIVE : SPI Slave Select Signal Inactive.
- ARM_SPI_SS_ACTIVE : SPI Slave Select Signal Active.
- ARM_SPI_ERROR_MODE : Specified Mode not supported.
- ARM_SPI_ERROR_FRAME_FORMAT : Specified Frame Format not supported.
- ARM_SPI_ERROR_DATA_BITS : Specified number of Data bits not supported.
- ARM_SPI_ERROR_BIT_ORDER : Specified Bit order not supported.
- ARM_SPI_ERROR_SS_MODE : Specified Slave Select Mode not supported.
- ARM_SPI_EVENT_TRANSFER_COMPLETE : SPI Event
- ARM_SPI_EVENT_DATA_LOST : Data lost: Receive overflow / Transmit underflow.
- ARM_SPI_EVENT_MODE_FAULT : Master Mode Fault (SS deactivated when Master).

Functions

- ARM_SPI_GetVersion : Get driver version.
- ARM_SPI_GetCapabilities : Get driver capabilities.
- ARM_SPI_Initialize : Initialize SPI Interface.
- ARM_SPI_Uninitialize : De-initialize SPI Interface.
- ARM_SPI_PowerControl : Control SPI Interface Power.
- ARM_SPI_Send : Start sending data to SPI transmitter.
- ARM_SPI_Receive : Start receiving data from SPI receiver.
- ARM_SPI_Transfer : Start sending/receiving data to/from SPI transmitter/receiver.
- ARM_SPI_GetDataCount : Get transferred data count.
- ARM_SPI_Control : Control SPI Interface.
- ARM_SPI_GetStatus : Get SPI status.
- ARM_SPI_SignalEvent : Signal SPI Events.