diff options
| author | Bernard Xiong <[email protected]> | 2019-01-14 17:49:52 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-01-14 17:49:52 +0800 |
| commit | b626deba358fe42066d4f40a129f4ed8b5e82c76 (patch) | |
| tree | 018bacfcb42233714529fb6770723698e1732840 /components | |
| parent | d55a9cd62ab936711d07c22c37fc978be896b84b (diff) | |
| parent | 52729bb62d126ace0c564268d47ae4232f69e684 (diff) | |
Merge pull request #2214 from xeonxu/fix_can
修复CAN驱动部分问题
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/can/can.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/drivers/can/can.c b/components/drivers/can/can.c index e20fcddcff..81fdf25a1e 100644 --- a/components/drivers/can/can.c +++ b/components/drivers/can/can.c @@ -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); } |
