summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorreynoldxu <[email protected]>2013-07-24 17:14:54 +0800
committerreynoldxu <[email protected]>2013-07-24 18:34:07 +0800
commit8f0fffc1323ff393bf8365aaa09e15e4ae7fa4bf (patch)
treedd2d94f6469f3809ba444c8a1001ca00510b603d /components/drivers
parent421d980b07e3d04716d19a762ce31e0eef2c140b (diff)
fix a bug in rt_hw_uart_init() where u CAN NOT init some feature.
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/serial/serial.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c
index 1f6b29e261..bcc9f431d9 100644
--- a/components/drivers/serial/serial.c
+++ b/components/drivers/serial/serial.c
@@ -145,7 +145,11 @@ static rt_err_t rt_serial_init(struct rt_device *dev)
serial_ringbuffer_init(serial->int_rx);
if (dev->flag & RT_DEVICE_FLAG_INT_TX)
+ {
+ serial->ops->control(serial, RT_DEVICE_CTRL_SET_INT, (void *)RT_NULL);
serial_ringbuffer_init(serial->int_tx);
+ serial->int_sending_flag = RT_FALSE;
+ }
if (dev->flag & RT_DEVICE_FLAG_DMA_TX)
{