1.41.8.29 MCANx_RxFifoCallbackRegister Function

C

void MCANx_RxFifoCallbackRegister(MCAN_RX_FIFO_NUM rxFifoNum, MCAN_RX_FIFO_CALLBACK callback, uintptr_t contextHandle) // x - Instance of the MCAN peripheral

Summary

Sets the pointer to the function (and it's contextHandle) to be called when the given MCAN's Rx transfer events occur.

Precondition

MCANx_Initialize must have been called for the associated MCAN instance.

Parameters

Param Description
rxFifoNum Rx FIFO Number
callback A pointer to callback function which function prototype definedby the MCAN_RX_FIFO_CALLBACK data type.
contextHandle A value passed into the callback function as callback parameter.

Returns

None.

Example

void APP_MCAN_RxFifo0Callback(uint8_t numberOfMessage, uintptr_t context)
{
}

MCAN0_RxFifoCallbackRegister(MCAN_RX_FIFO_0, APP_MCAN_RxFifo0Callback, NULL);

Remarks

None.