1.2.21.55 1.3.25.55 1.4.21.55 1.5.25.55 1.6.22.55 1.7.23.55 1.9.19.55 1.29.23.55 1.30.18.55 1.31.18.55 1.32.26.55 1.33.16.55 1.37.18.55 1.38.21.55 1.39.18.55 1.40.20.55 SERCOM_SPI_CALLBACK Typedef

C

/* SPI master (non-blocking mode) mode */
typedef void (*SERCOM_SPI_CALLBACK) (uintptr_t context)

Summary

Defines the data type and function signature for the SERCOM SPI peripheral callback function.

Description

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

Precondition

SERCOMx_SPI_Initialize must have been called for the given SERCOM SPI peripheral instance and SERCOMx_SPI_CallbackRegister must have been called to set the function to be called. The callback register function should have been called before a read, write or transfer function has been initiated.

Parameters

Param Description
context Allows the caller to provide a context value (usually a pointerto the callers context for multi-instance clients).

Returns

None.

Example

SERCOM0_SPI_CallbackRegister(&APP_SPITransferHandler, NULL);

void APP_SPITransferHandler(uintptr_t context)
{
    //Transfer completed
}

Remarks

None.