diff options
| author | Aubr.Cool <[email protected]> | 2015-11-19 13:45:14 +0800 |
|---|---|---|
| committer | Aubr.Cool <[email protected]> | 2015-11-23 09:43:48 +0800 |
| commit | b2d55d2c8c7819a4ee4ef694b8431fe65e675209 (patch) | |
| tree | 427b740302a98810e5e73101150cca8076925307 /bsp | |
| parent | 33de63fbe26f2c6b292cf71608bf9a6ee7b5859b (diff) | |
correct stm32f10x can sendmsg rtr flag error
Diffstat (limited to 'bsp')
| -rw-r--r-- | bsp/stm32f10x/drivers/bxcan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bsp/stm32f10x/drivers/bxcan.c b/bsp/stm32f10x/drivers/bxcan.c index 28849f7cdd..e19d971123 100644 --- a/bsp/stm32f10x/drivers/bxcan.c +++ b/bsp/stm32f10x/drivers/bxcan.c @@ -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)); pbxcan->sTxMailBox[boxno].TIR |= ((pmsg->id << 21) | \ - pmsg->rtr); + (pmsg->rtr << 1)); } else { assert_param(IS_CAN_EXTID(pmsg->id)); pbxcan->sTxMailBox[boxno].TIR |= ((pmsg->id << 3) | \ - pmsg->ide << 2 | \ - pmsg->rtr); + (pmsg->ide << 2) | \ + (pmsg->rtr << 1)); } pmsg->len &= (uint8_t)0x0000000F; |
