mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 03:07:21 +02:00
Merge branch 'bigfix/examples_ping_console_v5.1' into 'release/v5.1'
examples: Fix icmp-echo to auto connect to Ethernet/WiFi if selected (v5.1) See merge request espressif/esp-idf!24654
This commit is contained in:
@ -213,8 +213,19 @@ void app_main(void)
|
|||||||
ESP_ERROR_CHECK(esp_console_new_repl_usb_serial_jtag(&usbjtag_config, &repl_config, &repl));
|
ESP_ERROR_CHECK(esp_console_new_repl_usb_serial_jtag(&usbjtag_config, &repl_config, &repl));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Use either WiFi console commands or menuconfig options to connect to WiFi/Ethernet
|
||||||
|
*
|
||||||
|
* Please disable `Provide wifi connect commands` in `Example Connection Configuration`
|
||||||
|
* to connect immediately using configured interface and settings (WiFi/Ethernet).
|
||||||
|
*/
|
||||||
|
#if defined(CONFIG_EXAMPLE_PROVIDE_WIFI_CONSOLE_CMD)
|
||||||
/* register wifi connect commands */
|
/* register wifi connect commands */
|
||||||
example_register_wifi_connect_commands();
|
example_register_wifi_connect_commands();
|
||||||
|
#elif defined(CONFIG_EXAMPLE_CONNECT_WIFI) || defined(CONFIG_EXAMPLE_CONNECT_ETHERNET)
|
||||||
|
/* automatic connection per menuconfig */
|
||||||
|
ESP_ERROR_CHECK(example_connect());
|
||||||
|
#endif
|
||||||
|
|
||||||
/* register command `ping` */
|
/* register command `ping` */
|
||||||
register_ping();
|
register_ping();
|
||||||
/* register command `quit` */
|
/* register command `quit` */
|
||||||
|
Reference in New Issue
Block a user