From: Nathael Pajani Date: Thu, 15 Jun 2017 07:00:40 +0000 (+0200) Subject: Echo on serial must be only a "best effort" and not mangle with ongoing transmissions X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=9dbe4206d777273efdb9a118b78cfef0f9a3149b;p=soft%2Flpc82x%2Fcore Echo on serial must be only a "best effort" and not mangle with ongoing transmissions --- diff --git a/drivers/serial.c b/drivers/serial.c index 47dd72c..f5e561d 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -105,8 +105,10 @@ static void uart_check_rx(struct uart_device* uart, uint32_t intr) /* Call the Rx callback */ uart->rx_callback(data); } else { - /* Echo */ - uart->regs->tx_data = data; + /* Echo ? */ + if (!uart->sending) { + uart->regs->tx_data = data; + } } } /* FIXME : handle RX erors */