1.10.21.19 1.11.21.19 1.12.22.19 1.13.20.19 1.14.15.19 1.15.16.19 1.16.22.19 1.17.18.19 1.18.18.19 1.19.18.19 1.20.22.19 1.21.23.19 1.22.25.19 1.23.23.19 1.24.20.19 1.27.22.20 1.34.20.20 1.35.13.20 SPI_CALLBACK Typedef
C
/* SPI master (non-blocking mode) mode */ typedef void (*SPI_CALLBACK) (uintptr_t context)
Summary
Defines the data type and function signature for the SPI (master) peripheral callback function.
Description
This data type defines the function signature for the SPI (master) peripheral callback function. The SPI peripheral will call back the client's function with this signature when the SPI Transfer has completed.
Precondition
SPIx_Initialize must have been called for the given SPI peripheral instance and SPIx_CallbackRegister must have been called to set the function to be called. The callback register function must be called before initiating the SPI transfer.
Parameters
Param | Description |
---|---|
context | Allows the caller to provide a context value (usually a pointer to the callers context for multi-instance clients). |
Returns
None
Example
void APP_SPITransferHandler(uintptr_t context)
{
//Transfer completed
}
SPI1_CallbackRegister(&APP_SPITransferHandler, (uintptr_t)NULL);
Remarks
None