kopia lustrzana https://github.com/espressif/esp-idf
examples: move console_usb example to console directory
rodzic
c0dcebc41c
commit
cb4a197a98
|
@ -1,11 +1,11 @@
|
||||||
| Supported Targets | ESP32-S2 |
|
| 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.)
|
(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 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).
|
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
|
/* USB console example
|
||||||
|
|
||||||
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
||||||
|
@ -15,11 +20,12 @@
|
||||||
#include "esp_console.h"
|
#include "esp_console.h"
|
||||||
#include "linenoise/linenoise.h"
|
#include "linenoise/linenoise.h"
|
||||||
#include "argtable3/argtable3.h"
|
#include "argtable3/argtable3.h"
|
||||||
#include "cmd_nvs.h"
|
|
||||||
#include "cmd_system.h"
|
|
||||||
#include "esp_vfs_cdcacm.h"
|
#include "esp_vfs_cdcacm.h"
|
||||||
#include "nvs.h"
|
#include "nvs.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
|
#include "cmd_nvs.h"
|
||||||
|
#include "cmd_system.h"
|
||||||
|
#include "cmd_wifi.h"
|
||||||
|
|
||||||
static void initialize_nvs(void)
|
static void initialize_nvs(void)
|
||||||
{
|
{
|
||||||
|
@ -80,6 +86,7 @@ void app_main(void)
|
||||||
register_system_common();
|
register_system_common();
|
||||||
register_system_sleep();
|
register_system_sleep();
|
||||||
register_nvs();
|
register_nvs();
|
||||||
|
register_wifi();
|
||||||
|
|
||||||
/* Prompt to be printed before each line.
|
/* Prompt to be printed before each line.
|
||||||
* This can be customized, made dynamic, etc.
|
* This can be customized, made dynamic, etc.
|
Ładowanie…
Reference in New Issue