summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <thach@tinyusb.org>2018-12-28 00:39:33 +0700
committerhathach <thach@tinyusb.org>2018-12-28 00:40:29 +0700
commitd092722ae83f03f0da7a77b525037cf279465112 (patch)
tree3f0246355fee85193dce6be094c212fcd36485eb
parentddf0d3fc5335e076f150f3e5fe506a6978eb35b3 (diff)
fix #1407 keep receiving in case of error
-rw-r--r--ports/nrf/common-hal/busio/UART.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c
index a291af578..c200b6e6f 100644
--- a/ports/nrf/common-hal/busio/UART.c
+++ b/ports/nrf/common-hal/busio/UART.c
@@ -81,7 +81,7 @@ static void uart_callback_irq (const nrfx_uarte_event_t * event, void * context)
}
// keep receiving
- _VERIFY_ERR(nrfx_uarte_rx(&self->uarte, &self->rx_char, 1));
+ (void) nrfx_uarte_rx(&self->uarte, &self->rx_char, 1);
break;
case NRFX_UARTE_EVT_TX_DONE:
@@ -89,7 +89,11 @@ static void uart_callback_irq (const nrfx_uarte_event_t * event, void * context)
break;
case NRFX_UARTE_EVT_ERROR:
- // Handle error
+ // Possible Error source is Overrun, Parity, Framing, Break
+ // uint32_t errsrc = event->data.error.error_mask;
+
+ // Keep receiving
+ (void) nrfx_uarte_rx(&self->uarte, &self->rx_char, 1);
break;
default: