mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-06-24 00:21:05 +08:00
Update serial.c
fix reset serial receive interrupt flag when close serial
This commit is contained in:
@@ -358,7 +358,7 @@ static rt_err_t rt_serial_close(struct rt_device *dev)
|
||||
serial->serial_rx = RT_NULL;
|
||||
dev->open_flag &= ~RT_DEVICE_FLAG_INT_RX;
|
||||
/* configure low level device */
|
||||
serial->ops->control(serial, RT_DEVICE_CTRL_CLR_INT, (void*)RT_DEVICE_FLAG_INT_TX);
|
||||
serial->ops->control(serial, RT_DEVICE_CTRL_CLR_INT, (void*)RT_DEVICE_FLAG_INT_RX);
|
||||
}
|
||||
else if (dev->open_flag & RT_DEVICE_FLAG_DMA_RX)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user