Merge pull request #2615 from yaojinrun/master

[components][drivers][can] can.c bug修复:
This commit is contained in:
Bernard Xiong 2019-04-26 13:49:44 +08:00 committed by GitHub
commit 0f69471cfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);