feat(modem): Add support for pausing netif

Closes https://github.com/espressif/esp-protocols/issues/699
This commit is contained in:
David Cermak committed 2024-12-05 20:16:41 +01:00
1 parent 32387f7e39
commit 247f1681e8
7 files changed
+80 -9

No files matched your search

@@ -385,6 +385,17 @@ extern "C" void app_main(void)
return 0;
});
#endif
const ConsoleCommand PauseNetwork("pause_net", "toggle network pause", no_args, [&](ConsoleCommand * c) {
static int cnt = 0;
if (++cnt % 2) {
ESP_LOGI(TAG, "Pausing netif");
dce->pause_netif(true);
} else {
ESP_LOGI(TAG, "Unpausing netif");
dce->pause_netif(false);
}
return 0;
});
const struct SetApn {
SetApn(): apn(STR1, nullptr, nullptr, "<apn>", "APN (Access Point Name)") {}