Skip to content

Commit

Permalink
fixup can.h len/can_dlc
Browse files Browse the repository at this point in the history
  • Loading branch information
gdoffe committed Mar 23, 2024
1 parent 1f24ddb commit 3f79ea2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions sys/include/can/can.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,14 @@ typedef uint32_t canid_t;
* @brief Controller Area Network frame
*/
struct can_frame {
canid_t can_id; /**< 32 bit CAN_ID + EFF/RTR/ERR flags */
uint8_t len; /**< frame payload length in byte (0 .. CAN_MAX_DLEN) */
uint8_t __pad; /**< padding */
uint8_t __res0; /**< reserved / padding */
uint8_t __res1; /**< reserved / padding */
canid_t can_id; /**< 32 bit CAN_ID + EFF/RTR/ERR flags */
union {
uint8_t len; /**< frame payload length in byte (0 .. CAN_MAX_DLEN) */
uint8_t can_dlc;/**< deprecated - see SocketCAN documentation */
};
uint8_t __pad; /**< padding */
uint8_t __res0; /**< reserved / padding */
uint8_t __res1; /**< reserved / padding */
/** Frame data */
uint8_t data[CAN_MAX_DLEN] __attribute__((aligned(8)));
};
Expand Down

0 comments on commit 3f79ea2

Please sign in to comment.