1.3.3.26 CANx_RxBuffersCallbackRegister Function
C
void CANx_RxBuffersCallbackRegister(CAN_TXRX_BUFFERS_CALLBACK callback, uintptr_t contextHandle) // x - Instance of the CAN peripheral
Summary
Sets the pointer to the function (and it's contextHandle) to be called when the given CAN's Rx transfer events occur.
Precondition
CANx_Initialize must have been called for the associated CAN instance.
Parameters
Param | Description |
---|---|
callback | A pointer to callback function which function prototype definedby the CAN_TXRX_BUFFERS_CALLBACK data type. |
contextHandle | A value passed into the callback function as callback parameter. |
Returns
None.
Example
void APP_CAN_RxBufferCallback(uint8_t bufferNumber, uintptr_t context)
{
}
CAN0_RxBuffersCallbackRegister(APP_CAN_RxBufferCallback, NULL);
Remarks
None.