We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e47dc4 commit 52729bbCopy full SHA for 52729bb
components/drivers/can/can.c
@@ -405,6 +405,7 @@ static rt_err_t rt_can_close(struct rt_device *dev)
405
406
rt_free(rx_fifo);
407
dev->open_flag &= ~RT_DEVICE_FLAG_INT_RX;
408
+ can->can_rx = RT_NULL;
409
/* configure low level device */
410
can->ops->control(can, RT_DEVICE_CTRL_CLR_INT, (void *)RT_DEVICE_FLAG_INT_RX);
411
}
@@ -418,6 +419,7 @@ static rt_err_t rt_can_close(struct rt_device *dev)
418
419
420
rt_free(tx_fifo);
421
dev->open_flag &= ~RT_DEVICE_FLAG_INT_TX;
422
+ can->can_tx = RT_NULL;
423
424
can->ops->control(can, RT_DEVICE_CTRL_CLR_INT, (void *)RT_DEVICE_FLAG_INT_TX);
425
0 commit comments