mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 18:27:31 +02:00
feat(esp-modem): Add exit PPP in example
This commit is contained in:
@ -61,4 +61,10 @@ menu "Example Configuration"
|
||||
help
|
||||
HTTPS address of the update binary.
|
||||
|
||||
config EXAMPLE_CLOSE_CMUX_AT_END
|
||||
bool "Close multiplexed mode at the end of the example"
|
||||
default n
|
||||
help
|
||||
Close the multiplexed mode at the end of the example and rollback to command mode.
|
||||
|
||||
endmenu
|
||||
|
@ -164,4 +164,14 @@ extern "C" void app_main(void)
|
||||
return;
|
||||
}
|
||||
#endif // CONFIG_EXAMPLE_PERFORM_OTA
|
||||
|
||||
/* Close multiplexed command/data mode */
|
||||
#if CONFIG_EXAMPLE_CLOSE_CMUX_AT_END == 1
|
||||
if (dce->set_mode(esp_modem::modem_mode::COMMAND_MODE)) {
|
||||
std::cout << "Modem has correctly entered command mode" << std::endl;
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Failed to configure desired mode... exiting");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user