Open netlcod opened 9 months ago
I think the can_frame structure needs alignment added. This is necessary for cases when CAN commands are sent streaming (Serial, for example).
#pragma pack(push,1) struct can_frame { canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ __u8 can_dlc; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */ __u8 data[CAN_MAX_DLEN] __attribute__((aligned(8))); }; #pragma pack(pop)
Field sizes are 4b + 1b + 8b = 13b. Struct size is 16b without alignment.
I think the can_frame structure needs alignment added. This is necessary for cases when CAN commands are sent streaming (Serial, for example).
Field sizes are 4b + 1b + 8b = 13b. Struct size is 16b without alignment.