ESP32-Console

This commit is contained in:
2025-01-11 09:32:45 -05:00
parent 4dc132c163
commit 2ccf9cf3b5

View File

@@ -54,8 +54,6 @@ void app_main(void)
{ {
esp_console_repl_t *repl = NULL; esp_console_repl_t *repl = NULL;
esp_console_repl_config_t repl_config = ESP_CONSOLE_REPL_CONFIG_DEFAULT(); esp_console_repl_config_t repl_config = ESP_CONSOLE_REPL_CONFIG_DEFAULT();
esp_console_dev_uart_config_t uart_config = ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT();
//esp_console_dev_usb_cdc_config_t cdc_config = ESP_CONSOLE_DEV_CDC_CONFIG_DEFAULT();
initialize_nvs(); initialize_nvs();
//initialize_filesystem(); //initialize_filesystem();
@@ -64,13 +62,17 @@ void app_main(void)
/* /*
INITIALIZE COMMANDS INITIALIZE COMMANDS
*/ */
register_commands(); //register_commands();
repl_config.prompt = "foxie >"; repl_config.prompt = "foxie >";
//repl_config.max_cmdline_length = CONFIG_CONSOLE_MAX_COMMAND_LINE_LENGTH; //repl_config.max_cmdline_length = CONFIG_CONSOLE_MAX_COMMAND_LINE_LENGTH;
#if CONFIG_ESP_CONSOLE_UART
esp_console_dev_uart_config_t uart_config = ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_console_new_repl_uart(&uart_config, &repl_config, &repl)); ESP_ERROR_CHECK(esp_console_new_repl_uart(&uart_config, &repl_config, &repl));
#elif CONFIG_ESP_CONSOLE_USB_CDC
esp_console_dev_usb_cdc_config_t cdc_config = ESP_CONSOLE_DEV_CDC_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_console_new_repl_uart(&cdc_config, &repl_config, &repl));
/* /*
START CONSOLE REPL START CONSOLE REPL
*/ */