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.
© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.