SPI Driver Library Interface for MPLAB® Harmony v2

System Interaction Functions

Function NameDescription
DRV_SPI_InitializeInitializes the Serial Peripheral Interface (SPI) instance for the specified driver index
DRV_SPI_DeinitializeDeinitializes the specified instance of the SPI driver module
DRV_SPI_StatusProvides the current status of the SPI driver module
DRV_SPI_TasksMaintains the driver's state machine and implements its Interrupt Service Routine (ISR)

Client Setup Functions

Function NameDescription
DRV_SPI_CloseCloses an opened instance of the SPI driver
DRV_SPI_OpenOpens the specified SPI driver instance and returns a handle to it
DRV_SPI_ClientConfigureConfigures a SPI client with specific data

Data Transfer Functions

Function NameDescription
DRV_SPI_BufferStatusReturns the transmitter and receiver transfer status
DRV_SPI_BufferAddReadRegisters a buffer for a read operation. Actual transfer will happen in the Task function.
DRV_SPI_BufferAddWriteRegisters a buffer for a write operation. Actual transfer will happen in the Task function.
DRV_SPI_BufferAddWriteReadRegisters a buffer for a read and write operation. Actual transfer will happen in the Task function.
DRV_SPI_BufferAddRead2Registers a buffer for a read operation. Actual transfer will happen in the Task function.
DRV_SPI_BufferAddWrite2Registers a buffer for a write operation. Actual transfer will happen in the Task function.
DRV_SPI_BufferAddWriteRead2Registers a buffer for a read and write operation. Actual transfer will happen in the Task function.
DRV_SPIn_ReceiverBufferIsFullReturns the receive buffer status. 'n' represents the instance of the SPI driver used.
DRV_SPIn_TransmitterBufferIsFullReturns the transmit buffer status. 'n' represents the instance of the SPI driver used.