fix #1407 keep receiving in case of error

This commit is contained in:
hathach 2018-12-28 00:39:33 +07:00
parent ddf0d3fc53
commit d092722ae8
No known key found for this signature in database
GPG Key ID: 2FA891220FBFD581

View File

@ -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: