提交 b67a8152 编写于 作者: Y yaomo718

[components][drivers][can] can.c bug修复:

在RT_CAN_USING_HDR宏关闭的时候,接收数据大小的计算应该是:已使用链表数*sizeof(struct rt_can_msg)。
上级 214c1a6d
......@@ -854,7 +854,7 @@ void rt_hw_can_isr(struct rt_can_device *can, int event)
level = rt_hw_interrupt_disable();
/* get rx length */
rx_length = rx_fifo->freenumbers * sizeof(struct rt_can_msg);
rx_length = rt_list_len(&rx_fifo->uselist)* sizeof(struct rt_can_msg);
rt_hw_interrupt_enable(level);
can->parent.rx_indicate(&can->parent, rx_length);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册