1.3.3.27 CANx_RxFifoCallbackRegister Function

C

void CANx_RxFifoCallbackRegister(CAN_RX_FIFO_NUM rxFifoNum, CAN_RX_FIFO_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
rxFifoNum Rx FIFO Number
callback A pointer to callback function which function prototype definedby the CAN_RX_FIFO_CALLBACK data type.
contextHandle A value passed into the callback function as callback parameter.

Returns

None.

Example

void APP_CAN_RxFifo0Callback(uint8_t numberOfMessage, uintptr_t context)
{
}

CAN0_RxFifoCallbackRegister(CAN_RX_FIFO_0, APP_CAN_RxFifo0Callback, NULL);

Remarks

None.