stm32h7:Serial Fix Logic error in up_dma_txavailable

This commit is contained in:
David Sidrane 2024-03-25 06:09:04 -07:00 committed by Alan Carvalho de Assis
parent 075b0e5ac0
commit 3932cb2a3b

View File

@ -3360,7 +3360,8 @@ static void up_dma_txavailable(struct uart_dev_s *dev)
/* Only send when the DMA is idle */
if ((priv->dev.dmatx.length && priv->dev.dmatx.nlength) == 0 &&
if (priv->dev.dmatx.length == 0 &&
priv->dev.dmatx.nlength == 0 &&
stm32_dmaresidual(priv->txdma) == 0)
{
uart_xmitchars_dma(dev);