typedef union {
unsigned char msgfields;
struct{
unsigned char idType:1; // 1 bit (Standard Frame or Extended Frame)
unsigned char frameType:1; // 1 bit (Data Frame or RTR Frame)
unsigned char dlc:4; // 4 bit (No of data bytes a message frame contains)
unsigned char formatType:1; // 1 bit (CAN 2.0 Format or CAN_FD Format)
unsigned char brs:1; // 1 bit (Bit Rate Switch)
};
} CAN_MSG_FIELD;