From 773d3b6d40270039f8a9c5df73bac960a686f1e9 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Sun, 9 Aug 2020 19:58:20 +0100 Subject: [PATCH] nrf: ble_uart: Feed the 'dog when transmitting characters On systems that cannot feed the watchdog from an ISR (e.g. anything without a button) then tab completion is risky because the watchdog might fire before all the options are listed. Fix this by feeding the dog from the tx routine. Signed-off-by: Daniel Thompson --- ports/nrf/drivers/bluetooth/ble_uart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/nrf/drivers/bluetooth/ble_uart.c b/ports/nrf/drivers/bluetooth/ble_uart.c index f10e6d4d7..58c13a73f 100644 --- a/ports/nrf/drivers/bluetooth/ble_uart.c +++ b/ports/nrf/drivers/bluetooth/ble_uart.c @@ -117,6 +117,8 @@ int mp_hal_stdin_rx_chr(void) { } void mp_hal_stdout_tx_strn(const char *str, size_t len) { + wdt_feed(false); + // Not connected: drop output if (!ble_uart_enabled()) return;