2.124.59 USART_LIN_CALLBACK Typedef
C
/* USART LIN mode */ typedef void (* USART_LIN_CALLBACK)(uintptr_t context );
Summary
Defines the data type and function signature for the USART LIN peripheral callback function.
Description
This data type defines the function signature for the USART LIN peripheral callback function. The USART peripheral will call back the client's function with this signature when the USART LIN event has occurred.
Precondition
USARTx_Initialize must have been called for the given USART peripheral instance. Callback must have been registered using USARTx_LINIdCallbackRegister, USARTx_LINTcCallbackRegister or USARTx_LINBreakCallbackRegister routines.
Parameters
Param | Description |
---|---|
context | Allows the caller to provide a context value (usually a pointer to the callers context for multiple clients). |
Returns
None.
Example
uint8_t txBuffer[10]; uint8_t nTxBytes = 0; void LIN_DataTransferComplete_Callback_Handler( uintptr_t context) { LINDataTransferComplete = true; } USART0_Initialize(); USART0_LINTcCallbackRegister(LIN_DataTransferComplete_Callback_Handler, (uintptr_t)NULL); USART0_Write(txBuffer, nTxBytes);
Remarks
None.