diff --git a/examples/system/console_usb/CMakeLists.txt b/examples/system/console/advanced_usb_cdc/CMakeLists.txt similarity index 100% rename from examples/system/console_usb/CMakeLists.txt rename to examples/system/console/advanced_usb_cdc/CMakeLists.txt diff --git a/examples/system/console_usb/README.md b/examples/system/console/advanced_usb_cdc/README.md similarity index 95% rename from examples/system/console_usb/README.md rename to examples/system/console/advanced_usb_cdc/README.md index 921793950e..809ec282e0 100644 --- a/examples/system/console_usb/README.md +++ b/examples/system/console/advanced_usb_cdc/README.md @@ -1,11 +1,11 @@ | Supported Targets | ESP32-S2 | | ----------------- | -------- | -# USB Console Example +# USB_OTG CDC Console Example (See the README.md file in the upper level 'examples' directory for more information about examples.) -This example is similar to the [console example](../console/advanced/README.md), but instead of the UART it uses USB CDC for console output. +This example is similar to the [advanced console example](../advanced/README.md), but instead of the UART it uses the USB CDC port provided by USB_OTG peripheral for console output. The example uses the [Console Component](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/console.html#console) to create an interactive shell. The interactive shell implemented in this example contains a wide variety of commands, and can act as a basis for applications that require a command-line interface (CLI). diff --git a/examples/system/console_usb/main/CMakeLists.txt b/examples/system/console/advanced_usb_cdc/main/CMakeLists.txt similarity index 100% rename from examples/system/console_usb/main/CMakeLists.txt rename to examples/system/console/advanced_usb_cdc/main/CMakeLists.txt diff --git a/examples/system/console_usb/main/console_usb_example_main.c b/examples/system/console/advanced_usb_cdc/main/console_usb_example_main.c similarity index 96% rename from examples/system/console_usb/main/console_usb_example_main.c rename to examples/system/console/advanced_usb_cdc/main/console_usb_example_main.c index a4e2168ee0..25f1c6beec 100644 --- a/examples/system/console_usb/main/console_usb_example_main.c +++ b/examples/system/console/advanced_usb_cdc/main/console_usb_example_main.c @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Unlicense OR CC0-1.0 + */ /* USB console example This example code is in the Public Domain (or CC0 licensed, at your option.) @@ -15,11 +20,12 @@ #include "esp_console.h" #include "linenoise/linenoise.h" #include "argtable3/argtable3.h" -#include "cmd_nvs.h" -#include "cmd_system.h" #include "esp_vfs_cdcacm.h" #include "nvs.h" #include "nvs_flash.h" +#include "cmd_nvs.h" +#include "cmd_system.h" +#include "cmd_wifi.h" static void initialize_nvs(void) { @@ -80,6 +86,7 @@ void app_main(void) register_system_common(); register_system_sleep(); register_nvs(); + register_wifi(); /* Prompt to be printed before each line. * This can be customized, made dynamic, etc. diff --git a/examples/system/console_usb/sdkconfig.defaults b/examples/system/console/advanced_usb_cdc/sdkconfig.defaults similarity index 100% rename from examples/system/console_usb/sdkconfig.defaults rename to examples/system/console/advanced_usb_cdc/sdkconfig.defaults