Fix RTR position bit in TX mailbox register

pull/5610/head
Mathieu Garivet 2017-11-28 18:44:28 +01:00
parent 70e7b40468
commit 6ee3d80b1c
1 changed files with 2 additions and 2 deletions

View File

@ -277,9 +277,9 @@ int can_write(can_t *obj, CAN_Message msg, int cc)
can->sTxMailBox[transmitmailbox].TIR &= CAN_TI0R_TXRQ; can->sTxMailBox[transmitmailbox].TIR &= CAN_TI0R_TXRQ;
if (!(msg.format)) { if (!(msg.format)) {
can->sTxMailBox[transmitmailbox].TIR |= ((msg.id << 21) | msg.type); can->sTxMailBox[transmitmailbox].TIR |= ((msg.id << 21) | (msg.type << 1));
} else { } else {
can->sTxMailBox[transmitmailbox].TIR |= ((msg.id << 3) | CAN_ID_EXT | msg.type); can->sTxMailBox[transmitmailbox].TIR |= ((msg.id << 3) | CAN_ID_EXT | (msg.type << 1));
} }
/* Set up the DLC */ /* Set up the DLC */