summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorzhouchuanfu <[email protected]>2019-05-03 20:52:31 +0800
committerzhouchuanfu <[email protected]>2019-05-03 20:52:31 +0800
commitd52a412f4c5d9e5cb968826728cf554942497fdd (patch)
treeafb8c5023fa2894ff6137441f546f4f92c9c8802 /components
parentc2244a5c57d5fd0dbc4697ed43f1a14bbe791398 (diff)
增加串口DMA发送功能
Diffstat (limited to 'components')
-rw-r--r--components/drivers/serial/serial.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c
index d4cf35414c..cacaf1c9ac 100644
--- a/components/drivers/serial/serial.c
+++ b/components/drivers/serial/serial.c
@@ -675,6 +675,7 @@ static rt_err_t rt_serial_open(struct rt_device *dev, rt_uint16_t oflag)
serial->serial_tx = tx_dma;
dev->open_flag |= RT_DEVICE_FLAG_DMA_TX;
+ serial->ops->control(serial, RT_DEVICE_CTRL_CONFIG, (void *)RT_DEVICE_FLAG_DMA_TX);
}
#endif /* RT_SERIAL_USING_DMA */
else