summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorBluebear233 <[email protected]>2016-04-09 20:58:10 +0800
committerBluebear233 <[email protected]>2016-04-09 20:58:10 +0800
commit2b1983992fae904356a58f9e426b13db1e77e583 (patch)
tree5718cb7164d91f6274106af3f747d411e65e6284 /components/drivers
parent317294448efe474c126e3a03e78c3552929acc4f (diff)
Update serial.c
fix reset serial receive interrupt flag when close serial
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/serial/serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c
index 2cb298d7ff..dbdfc5e578 100644
--- a/components/drivers/serial/serial.c
+++ b/components/drivers/serial/serial.c
@@ -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)
{