From: Nathael Pajani Date: Thu, 15 Jun 2017 07:00:33 +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=d94a828f577e56a8062f3f0e23104bbc59f7e500;p=soft%2Flpc122x%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 155478e..c7ad543 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -92,8 +92,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->func.buffer = data; + /* Echo ? */ + if (!uart->sending) { + uart->regs->func.buffer = data; + } } } /* FIXME : handle RX erors */