For a project of mine, I needed more error handling and management when using the CAN bus, this is more a proposal than a bug.
CAN in the STM32 series is structured with mailboxes which are essential when sending CAN messages.
My proposal is to change the following methods:
/* change */ uint8_t Can::send(...);
//to return the mailbox used or CAN_TxStatus_NoMailBox if all mailboxes are in use
/* add */ bool Can::transmittionPending(uint8_t mbox);
//to check if the transmission is pending in the given mailbox
/* add */ bool Can::hasErrors();
//to check if errors occured during the last transmissions
//this method should set the ErrorCode in the errorProvider, so it can be tracked down.
Please also note that this proposal breaks the current Can API.
An implementation can be seen in my fork
For a project of mine, I needed more error handling and management when using the CAN bus, this is more a proposal than a bug.
CAN in the STM32 series is structured with mailboxes which are essential when sending CAN messages. My proposal is to change the following methods:
Please also note that this proposal breaks the current Can API. An implementation can be seen in my fork