1.27.9.28 MCANx_RxBuffersCallbackRegister Function

C

void MCANx_RxBuffersCallbackRegister(MCAN_TXRX_BUFFERS_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
callback A pointer to callback function which function prototype definedby the MCAN_TXRX_BUFFERS_CALLBACK data type.
contextHandle A value passed into the callback function as callback parameter.

Returns

None.

Example

void APP_MCAN_RxBufferCallback(uint8_t bufferNumber, uintptr_t context)
{
}

MCAN0_RxBuffersCallbackRegister(APP_MCAN_RxBufferCallback, NULL);

Remarks

None.