Explorar o código

[components/driver] Fix issue for serial_V2 in no buffer bloking tx mode.

Liu Yang hai 1 ano
pai
achega
59dbebe6fc
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      components/drivers/serial/serial_v2.c

+ 2 - 1
components/drivers/serial/serial_v2.c

@@ -483,7 +483,8 @@ static rt_ssize_t _serial_fifo_tx_blocking_nbuf(struct rt_device        *dev,
                                 RT_SERIAL_TX_BLOCKING);
     /* Waiting for the transmission to complete */
     rt_completion_wait(&(tx_fifo->tx_cpt), RT_WAITING_FOREVER);
-
+    /* Inactive tx mode flag */
+    tx_fifo->activated = RT_FALSE;
     return rst;
 }