From 6995516ce02a89de77c5439cc1e2e48498e5f35f Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 25 May 2019 10:24:11 +0200 Subject: [PATCH] fixed trailing ; in Tx --- src/emsuart.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/emsuart.cpp b/src/emsuart.cpp index 483b08ada..536572155 100644 --- a/src/emsuart.cpp +++ b/src/emsuart.cpp @@ -241,10 +241,11 @@ void ICACHE_FLASH_ATTR emsuart_tx_buffer(uint8_t * buf, uint8_t len) { emsuart_loopback(true); USC0(EMSUART_UART) |= (1 << UCBRK); // set - while (!(USIS(EMSUART_UART) & (1 << UIBD))) - ; // wait until BRK detected... - delayMicroseconds(EMSUART_BIT_TIME / 8); // ~13µs - USC0(EMSUART_UART) &= ~(1 << UCBRK); // clear + // wait until BRK detected... + while (!(USIS(EMSUART_UART) & (1 << UIBD))) { + delayMicroseconds(EMSUART_BIT_TIME / 8); // ~13µs + } + USC0(EMSUART_UART) &= ~(1 << UCBRK); // clear USIC(EMSUART_UART) = (1 << UIBD); // clear BRK detect IRQ emsuart_loopback(false); // disable loopback mode