Espressif ESP32-S2 Programming Manual page 815

Table of Contents

Advertisement

Chapter 2. API Reference
struct esp_console_dev_usb_cdc_config_t
Parameters for console device: USB CDC.
Note It's an empty structure for now, reserved for future
struct esp_console_cmd_t
Console command description.
Public Members
const char *command
Command name. Must not be NULL, must not contain spaces. The pointer must be valid until the call
to esp_console_deinit.
const char *help
Help text for the command, shown by help command. If set, the pointer must be valid until the call to
esp_console_deinit. If not set, the command will not be listed in 'help'output.
const char *hint
Hint text, usually lists possible arguments. If set to NULL, and 'argtable'field is non-NULL, hint will
be generated automatically
esp_console_cmd_func_t
Pointer to a function which implements the command.
void *argtable
Array or structure of pointers to arg_xxx structures, may be NULL. Used to generate hint text if 'hint'
is set to NULL. Array/structure which this field points to must end with an arg_end. Only used for the
duration of esp_console_cmd_register call.
struct esp_console_repl_s
Console REPL base structure.
Public Members
esp_err_t (*del)(esp_console_repl_t
Delete console REPL environment.
Return
• ESP_OK on success
• ESP_FAIL on errors
Parameters
• [in] repl: REPL handle returned from esp_console_new_repl_xxx
Macros
ESP_CONSOLE_CONFIG_DEFAULT()
Default console configuration value.
ESP_CONSOLE_REPL_CONFIG_DEFAULT()
Default console repl configuration value.
ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT()
ESP_CONSOLE_DEV_CDC_CONFIG_DEFAULT()
Type Definitions
typedef struct
linenoiseCompletions
typedef int (*esp_console_cmd_func_t)(int argc, char **argv)
Console command main function.
Return console command return code, 0 indicates "success"
Parameters
Espressif Systems
func
*repl)
linenoiseCompletions
804
Submit Document Feedback
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF