|
@@ -405,6 +405,7 @@ static rt_err_t rt_can_close(struct rt_device *dev)
|
|
|
|
|
|
rt_free(rx_fifo);
|
|
|
dev->open_flag &= ~RT_DEVICE_FLAG_INT_RX;
|
|
|
+ can->can_rx = RT_NULL;
|
|
|
/* configure low level device */
|
|
|
can->ops->control(can, RT_DEVICE_CTRL_CLR_INT, (void *)RT_DEVICE_FLAG_INT_RX);
|
|
|
}
|
|
@@ -418,6 +419,7 @@ static rt_err_t rt_can_close(struct rt_device *dev)
|
|
|
|
|
|
rt_free(tx_fifo);
|
|
|
dev->open_flag &= ~RT_DEVICE_FLAG_INT_TX;
|
|
|
+ can->can_tx = RT_NULL;
|
|
|
/* configure low level device */
|
|
|
can->ops->control(can, RT_DEVICE_CTRL_CLR_INT, (void *)RT_DEVICE_FLAG_INT_TX);
|
|
|
}
|