Part Number: LAUNCHXL-F280025C
I am getting some warnings (*) after compile:
typedef struct
{
uint32_t msgID;
uint8_t identifierType;
uint8_t dlc;
uint8_t data[8];
} CAN_Message;
typedef struct
{
uint8_t targetAddress;
uint8_t sourceAddress;
uint8_t priority;
uint8_t messageType;
uint8_t dlc;
uint8_t data[8];
} CAN_Message2;
...
CAN_Message TxMessage;
(*) TxMessage.msgID = (uint32_t)((0x00 << 26) | (0x00 << 22) | (0x00 << 16) | (txStruct[iLoop].TA << 8) | txStruct[iLoop].SA);
...
CAN_Message2 message
CAN_Message test_message;
(*) test_message.msgID = (uint32_t) ((message->priority << 26)
| (message->messageType << 22) | (1<< 16)
| (message->targetAddress << 8) | message->sourceAddress);
(*) Warning: #64-D shift count is too large
Even though I am casting the value before pass it to the structure I am getting this warning.
Do you have any advice to prevent this from happening?
Thanks,
Wilson