Add CAN_ENFORCE_USE_CALLBACKS in halconf.h Topic is solved
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Add CAN_ENFORCE_USE_CALLBACKS in halconf.h
Hi,
I modified the option in a proper switch and regenerated all halconf.h files.
Giovanni
I modified the option in a proper switch and regenerated all halconf.h files.
Giovanni
Re: Add CAN_ENFORCE_USE_CALLBACKS in halconf.h
In hal_can_lld.h, it doesn't check the TRUE/FALSE value of the switch. It just checks if it is defined. It should check the value, similar to how CAN_USE_SLEEP_MODE is checked (I'm looking at STM32/LLD/CANv1/hal_can_lld.h).
Also, in hal_can_lld.h it checks sleep mode like this:
#if (CAN_USE_SLEEP_MODE == TRUE) || defined (__DOXYGEN__)
.. and just above that, it checks it like this:
#if CAN_USE_SLEEP_MODE || defined (__DOXYGEN__)
If believe the latter way is more consistent with the rest of the file(s).
Also, in hal_can_lld.h it checks sleep mode like this:
#if (CAN_USE_SLEEP_MODE == TRUE) || defined (__DOXYGEN__)
.. and just above that, it checks it like this:
#if CAN_USE_SLEEP_MODE || defined (__DOXYGEN__)
If believe the latter way is more consistent with the rest of the file(s).
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Add CAN_ENFORCE_USE_CALLBACKS in halconf.h
Hi,
Fixed, the comparison with the constant is required by the MISRA checker, I am switching to that style gradually in LLDs. High level parts consistently use that already.
Giovanni
Fixed, the comparison with the constant is required by the MISRA checker, I am switching to that style gradually in LLDs. High level parts consistently use that already.
Giovanni
Return to “Small Change Requests”
Who is online
Users browsing this forum: No registered users and 23 guests