mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-06-25 17:31:33 +02:00
fix(modem): Fix vfs terminal not to reset read_cb() automatically
This change is needed for the fs terminal to work correctly again, after
merging 44bae24c78
which shifted
responsibility of thread safety from a terminal to the DTE. (Before it
was the terminal, which removed this callback safely when processing completed,
and thus we had to check the callback return value). Not the DTE layers
are responsible for thread safety and the return value indicates
success/failure from processing.
Also uses the default clock, the same way as UART terminal.
This commit is contained in:
@ -14,7 +14,7 @@
|
|||||||
.stop_bits = UART_STOP_BITS_1, \
|
.stop_bits = UART_STOP_BITS_1, \
|
||||||
.parity = UART_PARITY_DISABLE, \
|
.parity = UART_PARITY_DISABLE, \
|
||||||
.flow_control = ESP_MODEM_FLOW_CONTROL_NONE,\
|
.flow_control = ESP_MODEM_FLOW_CONTROL_NONE,\
|
||||||
.source_clk = UART_SCLK_APB, \
|
.source_clk = ESP_MODEM_DEFAULT_UART_CLK, \
|
||||||
.baud_rate = 115200, \
|
.baud_rate = 115200, \
|
||||||
.tx_io_num = 25, \
|
.tx_io_num = 25, \
|
||||||
.rx_io_num = 26, \
|
.rx_io_num = 26, \
|
||||||
|
@ -122,9 +122,7 @@ void FdTerminal::task()
|
|||||||
} else {
|
} else {
|
||||||
if (FD_ISSET(f.fd, &rfds)) {
|
if (FD_ISSET(f.fd, &rfds)) {
|
||||||
if (on_read_priv) {
|
if (on_read_priv) {
|
||||||
if (on_read_priv(nullptr, 0)) {
|
on_read_priv(nullptr, 0);
|
||||||
on_read_priv = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user