hi
I am writing a CAN FD communication firmware utilizing the MPC5748G.
During the development of the firmware, I am using the FLEXCAN_DRV_InstallEventCallback function to write in interrupt format as much as possible.
This function takes 3 parameters as arguments, and for the callbackParam argument, I usually enter the value as 'NULL' in other examples.
ex) FLEXCAN_DRV_InstallEventCallback(INST_CANCOM1, FlexCan_RxTx_Callback, NULL);
This will cause the following warining in the function.
'passing argument 2 of 'FLEXCAN_DRV_InstallEventCallback' from incompatible pointer type'
Why does this warning occur, and can I ignore it?
Hi,
maybe your callback function has different parameter type used. Did you define function as below?
void FlexCan_RxTx_Callback(uint8_t instance, flexcan_event_type_t eventType, uint32_t mb_num,
flexcan_state_t *flexcanState)
{
(void)flexcanState;
(void)instance;
switch(eventType)
{
....
BR, Petr