Skip to content

Commit

Permalink
can: Add the padding to can_frame as Linux expects that
Browse files Browse the repository at this point in the history
The can_frame struct must be identical with Linux in order
to send data properly.

Signed-off-by: Jukka Rissanen <[email protected]>
  • Loading branch information
jukkar authored and nashif committed Mar 9, 2019
1 parent 7a00658 commit 608647e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/can.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ struct can_frame {
/** The length of the message */
u8_t can_dlc;

/** @cond INTERNAL_HIDDEN */
u8_t pad; /* padding */
u8_t res0; /* reserved / padding */
u8_t res1; /* reserved / padding */
/** @endcond */

/** The message data */
u8_t data[CAN_MAX_DLEN];
};
Expand Down

0 comments on commit 608647e

Please sign in to comment.