File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
components/esp_modem/examples/modem_console/main Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -205,8 +205,18 @@ extern "C" void app_main(void)
205205
206206 // init console REPL environment
207207 esp_console_repl_config_t repl_config = ESP_CONSOLE_REPL_CONFIG_DEFAULT ();
208+ #if defined(CONFIG_ESP_CONSOLE_UART_DEFAULT) || defined(CONFIG_ESP_CONSOLE_UART_CUSTOM)
208209 esp_console_dev_uart_config_t uart_config = ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT ();
209210 ESP_ERROR_CHECK (esp_console_new_repl_uart (&uart_config, &repl_config, &s_repl));
211+ #elif defined(CONFIG_ESP_CONSOLE_USB_CDC)
212+ esp_console_dev_usb_cdc_config_t hw_config = ESP_CONSOLE_DEV_CDC_CONFIG_DEFAULT ();
213+ ESP_ERROR_CHECK (esp_console_new_repl_usb_cdc (&hw_config, &repl_config, &s_repl));
214+ #elif defined(CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG)
215+ esp_console_dev_usb_serial_jtag_config_t hw_config = ESP_CONSOLE_DEV_USB_SERIAL_JTAG_CONFIG_DEFAULT ();
216+ ESP_ERROR_CHECK (esp_console_new_repl_usb_serial_jtag (&hw_config, &repl_config, &s_repl));
217+ #else
218+ #error Unsupported console type
219+ #endif
210220
211221 switch (esp_sleep_get_wakeup_cause ()) {
212222 case ESP_SLEEP_WAKEUP_TIMER:
You can’t perform that action at this time.
0 commit comments