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>
This commit is contained in:
Mieszko Mierunski 2019-05-15 11:38:25 +02:00 committed by Carles Cufí
commit 7b0576243a

View file

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