esp_modem: Return true from on_data callback in data mode

The callback should return false only if there is a problem with the received data.
The updated UART Terminal implementation cannot longer clear is callback.
It is DTE's responsibility to clear the callback.
This commit is contained in:
Tomas Rezucha
2023-02-23 20:30:53 +01:00
parent 02be2b76f8
commit 44bae24c78
4 changed files with 4 additions and 6 deletions

View File

@ -125,9 +125,7 @@ void UartTerminal::task()
case UART_DATA:
uart_get_buffered_data_len(uart.port, &len);
if (len && on_read) {
if (on_read(nullptr, len)) {
on_read = nullptr;
}
on_read(nullptr, len);
}
break;
case UART_FIFO_OVF: