summaryrefslogtreecommitdiff
path: root/components/drivers/serial
diff options
context:
space:
mode:
authorwdfk-prog <[email protected]>2023-01-05 14:25:16 +0800
committerGitHub <[email protected]>2023-01-05 01:25:16 -0500
commit8f0cef3a87efa3306fc24dcc0758cbf555a60acb (patch)
treed81e08ea43bc9d11c1d82045010d296a6e44af8a /components/drivers/serial
parent24575c44861eae1646d44bea2663cad7391d4659 (diff)
[drivers][serial_v2]修复DMA+TX阻塞模式异常 (#6781)
* [drivers][serial_v2]修复DMA+TX阻塞模式异常
Diffstat (limited to 'components/drivers/serial')
-rw-r--r--components/drivers/serial/serial_v2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/drivers/serial/serial_v2.c b/components/drivers/serial/serial_v2.c
index fc03605c1d..5784f1fee7 100644
--- a/components/drivers/serial/serial_v2.c
+++ b/components/drivers/serial/serial_v2.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -694,6 +694,7 @@ static rt_err_t rt_serial_tx_enable(struct rt_device *dev,
tx_fifo->activated = RT_FALSE;
tx_fifo->put_size = 0;
+ rt_memset(&tx_fifo->rb, RT_NULL, sizeof(tx_fifo->rb));
rt_completion_init(&(tx_fifo->tx_cpt));
dev->open_flag |= RT_SERIAL_TX_BLOCKING;