Hello there,
I am trying to solve the following issue. On the UART I will be receiving a stream of messages. These messages can be each of different lengths. The length of the message is parsed later. So as I am receiving these messages, the first receive buffer is being filled up with data and at some point the buffer will be switched with a second one as per the documentation. As much as I understand this choice I am wondering if there is a way to reset the received data offset, other than disabling and re-enabling the UART.
struct uart_event_rx { /** @brief Pointer to current buffer. */ uint8_t *buf; /** @brief Currently received data offset in bytes. */ size_t offset; /** @brief Number of new bytes received. */ size_t len; };