mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-23 12:15:32 +08:00
Merge pull request #2998 from tyustli/can
[bsp] [stm32] fix drv_can.c and can.c bug
This commit is contained in:
@@ -515,7 +515,11 @@ static int _can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t fifo)
|
||||
/* get len */
|
||||
pmsg->len = rxheader.DLC;
|
||||
/* get hdr */
|
||||
#ifdef BSP_USING_CAN2
|
||||
pmsg->hdr = rxheader.FilterMatchIndex;
|
||||
#else
|
||||
pmsg->hdr = (rxheader.FilterMatchIndex + 1) >> 1;
|
||||
#endif
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user