forked from espressif/esp-idf
examples: move console_usb example to console directory
This commit is contained in:
@@ -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).
|
@@ -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.
|
Reference in New Issue
Block a user