mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-16 12:02:11 +02:00
Merge pull request #361 from david-cermak/fix/modem_cosmetic
fix(modem): Update vfs terminal; Removed designated init
This commit is contained in:
@ -64,7 +64,7 @@ jobs:
|
|||||||
COMP_DIR: esp-protocols/components/esp_modem
|
COMP_DIR: esp-protocols/components/esp_modem
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: esp-protocols
|
path: esp-protocols
|
||||||
|
|
||||||
|
@ -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, \
|
||||||
|
@ -49,9 +49,9 @@ esp_err_t Netif::esp_modem_post_attach(esp_netif_t *esp_netif, void *args)
|
|||||||
ESP_ERROR_CHECK(esp_netif_set_driver_config(esp_netif, &driver_ifconfig));
|
ESP_ERROR_CHECK(esp_netif_set_driver_config(esp_netif, &driver_ifconfig));
|
||||||
// check if PPP error events are enabled, if not, do enable the error occurred/state changed
|
// check if PPP error events are enabled, if not, do enable the error occurred/state changed
|
||||||
// to notify the modem layer when switching modes
|
// to notify the modem layer when switching modes
|
||||||
esp_netif_ppp_config_t ppp_config = { .ppp_phase_event_enabled = true, // assuming phase enabled, as earlier IDFs
|
esp_netif_ppp_config_t ppp_config = { };
|
||||||
.ppp_error_event_enabled = false
|
ppp_config.ppp_phase_event_enabled = true; // assuming phase enabled, as earlier IDFs
|
||||||
}; // don't provide cfg getters so we enable both events
|
ppp_config.ppp_error_event_enabled = false; // don't provide cfg getters so we enable both events
|
||||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0)
|
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0)
|
||||||
esp_netif_ppp_get_params(esp_netif, &ppp_config);
|
esp_netif_ppp_get_params(esp_netif, &ppp_config);
|
||||||
#endif // ESP-IDF >= v4.4
|
#endif // ESP-IDF >= v4.4
|
||||||
|
@ -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