drivers: serial: esp32: Fix next buffer release on rx disable

Set event data rx buffer as next buffer instead of current buffer.

Signed-off-by: Thibo Verheyde <thibo@dptechnics.com>
This commit is contained in:
Thibo Verheyde 2024-05-08 09:35:08 +02:00 committed by Alberto Escolar
parent 6f215526d7
commit ddef306394
1 changed files with 1 additions and 1 deletions

View File

@ -888,7 +888,7 @@ static int uart_esp32_async_rx_disable(const struct device *dev)
/*Release next buffer*/
if (data->async.rx_next_len) {
evt.type = UART_RX_BUF_RELEASED;
evt.data.rx_buf.buf = data->async.rx_buf;
evt.data.rx_buf.buf = data->async.rx_next_buf;
if (data->async.cb) {
data->async.cb(dev, &evt, data->async.user_data);
}