1.34.27.45 1.35.21.45 USART_SPI_CALLBACK Typedef

C

/* USART SPI master (non-blocking mode) mode */

typedef void (*USART_SPI_CALLBACK) (uintptr_t context)

Summary

Defines the data type and function signature for the USART SPI (master) peripheral callback function.

Description

This data type defines the function signature for the USART SPI (master) peripheral callback function. The USART SPI peripheral will call back the client's function with this signature when the SPI Transfer has completed.

Precondition

USARTx_SPI_Initialize must have been called for the given SPI peripheral instance and USARTx_SPI_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
}

USART1_SPI_CallbackRegister(&APP_SPITransferHandler, (uintptr_t)NULL);

Remarks

None