tests: drivers: uart: uart_elementary: Fix RX handling

Rx_byte_offset was wrongly updated which could lead to test
failures.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2024-04-17 17:49:34 +02:00 committed by Fabio Baltieri
commit b36550b8a5

View file

@ -66,14 +66,12 @@ static void uart_rx_interrupt_service(const struct device *dev, uint8_t *receive
int *rx_byte_offset)
{
int rx_data_length = 0;
int bytes_received = 0;
do {
rx_data_length = uart_fifo_read(dev, receive_buffer_pointer + *rx_byte_offset,
TEST_BUFFER_LEN);
bytes_received += rx_data_length;
*rx_byte_offset += rx_data_length;
} while (rx_data_length);
*rx_byte_offset += bytes_received;
}
/*