-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
Description
- Type: Bug
- Related issue: [STM32] CAN read() return value #3463
- Priority: Major
According to the CAN.h header file the write() method is only supposed to return 1 if send was successful. All of the STM32 implementations in can_api.c are hard coded to return 1;.
The NXP targets implement this correctly, can_api.c
Bug
Target
STM32
Expected behavior
Only return 1 if write was successful.
Actual behavior
Returns 1 regardless if write was successful.
Steps to reproduce
if (can1.write(CANMessage(1337, &data, sizeof(data)))
{
// This will always print
printf("tx\n");
}