SPI Driver Library Interface
Detailed descriptions for this library can be found in the MPLAB® Harmony Documentation.
(found in the <harmony install directory>/doc folder)
System Interaction Functions
| Name | Description |
|---|---|
| DRV_SPI_Initialize | Initializes the SPI instance for the specified driver index. |
| DRV_SPI_Deinitialize | Deinitializes the specified instance of the SPI driver module. |
| DRV_SPI_Status | Provides the current status of the SPI driver module. |
| DRV_SPI_Tasks | Maintains the driver's state machine and implements its ISR. |
Client Setup Functions
| Name | Description |
|---|---|
| DRV_SPI_Close | Closes an opened instance of the SPI driver. |
| DRV_SPI_Open | Opens the specified SPI driver instance and returns a handle to it. |
| DRV_SPI_ClientConfigure | Configures a SPI client with specific data. |
Data Transfer Functions
| Name | Description |
|---|---|
| DRV_SPI_BufferStatus | Returns the transmitter and receiver transfer status. |
| DRV_SPI_BufferAddRead | Registers a buffer for a read operation. Actual transfer will happen in the Task function. |
| DRV_SPI_BufferAddWrite | Registers a buffer for a write operation. Actual transfer will happen in the Task function. |
| DRV_SPI_BufferAddWriteRead | Registers a buffer for a read and write operation. Actual transfer will happen in the Task function. |
| DRV_SPI_BufferAddRead2 | Registers a buffer for a read operation. Actual transfer will happen in the Task function. |
| DRV_SPI_BufferAddWrite2 | Registers a buffer for a write operation. Actual transfer will happen in the Task function. |
| DRV_SPI_BufferAddWriteRead2 | Registers a buffer for a read and write operation. Actual transfer will happen in the Task function. |
| DRV_SPIn_ReceiverBufferIsFull | Returns the receive buffer status. 'n' represents the instance of the SPI driver used. |
| DRV_SPIn_TransmitterBufferIsFull | Returns the transmit buffer status. 'n' represents the instance of the SPI driver used. |

