typedef struct _CAN_MSG_OBJ { uint32_t mode_id; uint32_t mask; uint8_t data[8]; uint8_t dlc; uint8_t msgobj; } CAN_MSG_OBJ; |
void CAN_rx(uint8_t msg_obj_num) { /* Determine which CAN message has been received */ msg_obj.msgobj = msg_obj_num; /* Now load up the msg_obj structure with the CAN message */ (*rom)->pCAND->can_receive(&msg_obj); //message number 10: command data [color=#f00] if (msg_obj_num == 10)//message number 10 { if(msg_obj.id == (0x280))//ID 0x280[/color] ... { |