You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The prototype for can_init in can.h and the source files is not the same, leading to compilation errors when compiling without -fshort-enums.
It would be better to not depend on this compiler flag and simply uint8_t everywhere, but at the very least, both can.h and the driver code should use the same prototype. If avr-can-lib is compiled with -fshort-enums while the application code is not, there will be a mismatch between the data types used for the bitrate argument, leading to problems.
I suggest either replacing the following in can.h:
The prototype for
can_init
in can.h and the source files is not the same, leading to compilation errors when compiling without-fshort-enums
.It would be better to not depend on this compiler flag and simply uint8_t everywhere, but at the very least, both can.h and the driver code should use the same prototype. If avr-can-lib is compiled with
-fshort-enums
while the application code is not, there will be a mismatch between the data types used for the bitrate argument, leading to problems.I suggest either replacing the following in can.h:
with
or (less preferred) replacing the driver routines
with
Apparently, this was already done for
bool mcp2515_init(can_bitrate_t bitrate)
, so someone must have run into the same problem before.The text was updated successfully, but these errors were encountered: