提交 b2d55d2c 编写于 作者: A Aubr.Cool

correct stm32f10x can sendmsg rtr flag error

上级 33de63fb
...@@ -1185,14 +1185,14 @@ static int sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t boxno ...@@ -1185,14 +1185,14 @@ static int sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t boxno
{ {
assert_param(IS_CAN_STDID(pmsg->id)); assert_param(IS_CAN_STDID(pmsg->id));
pbxcan->sTxMailBox[boxno].TIR |= ((pmsg->id << 21) | \ pbxcan->sTxMailBox[boxno].TIR |= ((pmsg->id << 21) | \
pmsg->rtr); (pmsg->rtr << 1));
} }
else else
{ {
assert_param(IS_CAN_EXTID(pmsg->id)); assert_param(IS_CAN_EXTID(pmsg->id));
pbxcan->sTxMailBox[boxno].TIR |= ((pmsg->id << 3) | \ pbxcan->sTxMailBox[boxno].TIR |= ((pmsg->id << 3) | \
pmsg->ide << 2 | \ (pmsg->ide << 2) | \
pmsg->rtr); (pmsg->rtr << 1));
} }
pmsg->len &= (uint8_t)0x0000000F; pmsg->len &= (uint8_t)0x0000000F;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册