feat(examples): Add PPP to common connection component

This commit is contained in:
David Cermak
2023-10-04 17:35:57 +02:00
parent 8b953557c1
commit 1780bababd
7 changed files with 411 additions and 1 deletions

View File

@@ -101,6 +101,12 @@ esp_err_t example_connect(void)
}
ESP_ERROR_CHECK(esp_register_shutdown_handler(&example_wifi_shutdown));
#endif
#if CONFIG_EXAMPLE_CONNECT_PPP
if (example_ppp_connect() != ESP_OK) {
return ESP_FAIL;
}
ESP_ERROR_CHECK(esp_register_shutdown_handler(&example_ppp_shutdown));
#endif
#if CONFIG_EXAMPLE_CONNECT_ETHERNET
example_print_all_netif_ips(EXAMPLE_NETIF_DESC_ETH);
@@ -110,6 +116,10 @@ esp_err_t example_connect(void)
example_print_all_netif_ips(EXAMPLE_NETIF_DESC_STA);
#endif
#if CONFIG_EXAMPLE_CONNECT_PPP
example_print_all_netif_ips(EXAMPLE_NETIF_DESC_PPP);
#endif
return ESP_OK;
}