Tool/software:
Hi all,
using simplelink_cc13xx_cc26xx_sdk_7_40_00_77 CAN driver for TCAN455X via SPI
CAN_open() is passed a CAN_Params struct:
typedef struct { const CAN_MsgRAMConfig *msgRAMConfig; /*!< Pointer to message RAM configuration */ const CAN_BitRateTimingRaw *bitTiming; /*!< Pointer to raw bit timing values */ CAN_EventCbk eventCbk; /*!< Pointer to event callback function */ uint32_t eventMask; /*!< Mask of events to call event callback function for */ void *userArg; /*!< User supplied arg for callback */ } CAN_Params;
Observation: the provided 'eventCbk' function get called as configured, but its 'userArg' parameter is always NULL, that is, params->userArg passed to CAN_open() does not get passed on to the callback as expected:
* @param[in] userArg A user supplied argument specified * in CAN_Params. */ typedef void (*CAN_EventCbk)(CAN_Handle handle, uint32_t event, uint32_t data, void *userArg);
CAN_open() does not transfer member 'userArg' to the CAN_Object - here's the code snippet out of CAN_open() in source/TI/drivers/CAN.c where one would expect his to happen:
'params' is also passed to CAN_initDevice() in source/TI/drivers/can/TCAN455X.c, but struct member 'userArg' is ignored there as well.
Is this a known limitation that will be fixed soon? I wanted to use 'userArg' and now have to resort to a global variable to work around this.
Regards,
Wolfgang