correct bxcan rcv msg rtr flag set

This commit is contained in:
Aubr.Cool 2015-06-05 08:33:56 +08:00
parent 2fc33973de
commit b319fb53e4
1 changed files with 1 additions and 1 deletions

View File

@ -1063,7 +1063,7 @@ static int recvmsg(struct rt_can_device *can, void* buf, rt_uint32_t boxno)
pmsg->id = (uint32_t)0x1FFFFFFF & (pbxcan->sFIFOMailBox[boxno].RIR >> 3);
}
pmsg->rtr = (uint8_t)0x02 & pbxcan->sFIFOMailBox[boxno].RIR;
pmsg->rtr = ((uint8_t)0x02 & pbxcan->sFIFOMailBox[boxno].RIR) >> 1;
pmsg->len = (uint8_t)0x0F & pbxcan->sFIFOMailBox[boxno].RDTR;
pmsg->data[0] = (uint8_t)0xFF & pbxcan->sFIFOMailBox[boxno].RDLR;
pmsg->data[1] = (uint8_t)0xFF & (pbxcan->sFIFOMailBox[boxno].RDLR >> 8);