stm32: Fix RTR and EFF canbus tx requests in can.c

Commit 3f7d05dd attempted to add support for transmitting RTR and EFF
frames to stm32/can.c , but the change was incomplete.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2025-10-23 11:39:17 -04:00
parent 7a723bdc1c
commit 296af60985

View File

@@ -127,7 +127,7 @@ canhw_send(struct canbus_msg *msg)
else
tir = (msg->id & 0x7ff) << CAN_TI0R_STID_Pos;
tir |= msg->id & CANMSG_ID_RTR ? CAN_TI0R_RTR : 0;
mb->TIR = (msg->id << CAN_TI0R_STID_Pos) | CAN_TI0R_TXRQ;
mb->TIR = tir | CAN_TI0R_TXRQ;
return CANMSG_DATA_LEN(msg);
}