From 8f2758bde29c944326474c5f4450c6655986b172 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 3988dc300..f29625613 100644 --- a/ports/nrf/drivers/bluetooth/ble_uart.c +++ b/ports/nrf/drivers/bluetooth/ble_uart.c @@ -121,6 +121,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;