drivers: CAN: Limit the DLC to 8

This commit limits the data length code to eight.
DLC > 8 returns a newly introduced CAN_TX_EINVAL error code.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
This commit is contained in:
Alexander Wachter 2019-11-06 10:03:20 +01:00 committed by Kumar Gala
commit d558fd055a
6 changed files with 40 additions and 2 deletions

View file

@ -47,6 +47,9 @@ extern "C" {
/** unexpected error */
#define CAN_TX_UNKNOWN (-5)
/** invalid parameter */
#define CAN_TX_EINVAL (-22)
/** attach_* failed because there is no unused filter left*/
#define CAN_NO_FREE_FILTER (-1)