Skip to content
Permalink
Browse files

drivers: nrf: Fix long receptions in UARTE async API.

If reception was longer than rx timeout, UART_RX_RDY event
would provide data with delay, and synchronise at buffer end.

This change makes sure that all data is given to user when timeout
occurs.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
  • Loading branch information...
Mierunski authored and carlescufi committed May 15, 2019
1 parent a7a6250 commit 7b0576243afe2dd868c9804a09b35d52adf2d0d6
Showing with 1 addition and 3 deletions.
  1. +1 −3 drivers/serial/uart_nrfx_uarte.c
@@ -690,9 +690,7 @@ static void endrx_isr(struct device *dev)
data->async->rx_buf = data->async->rx_next_buf;
data->async->rx_next_buf = NULL;

data->async->rx_total_byte_cnt += rx_len;
data->async->rx_total_user_byte_cnt =
data->async->rx_total_byte_cnt;
data->async->rx_total_user_byte_cnt += rx_len;
data->async->rx_offset = 0;
} else {
data->async->rx_buf = NULL;

0 comments on commit 7b05762

Please sign in to comment.
You can’t perform that action at this time.