|
|
@@ -65,6 +65,7 @@ typedef struct {
|
|
|
.max_cmdline_length = 0, \
|
|
|
}
|
|
|
|
|
|
+#if CONFIG_ESP_CONSOLE_UART_DEFAULT || CONFIG_ESP_CONSOLE_UART_CUSTOM
|
|
|
/**
|
|
|
* @brief Parameters for console device: UART
|
|
|
*
|
|
|
@@ -76,7 +77,7 @@ typedef struct {
|
|
|
int rx_gpio_num; //!< GPIO number for RX path, -1 means using default one
|
|
|
} esp_console_dev_uart_config_t;
|
|
|
|
|
|
-#ifdef CONFIG_ESP_CONSOLE_UART_CUSTOM
|
|
|
+#if CONFIG_ESP_CONSOLE_UART_CUSTOM
|
|
|
#define ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT() \
|
|
|
{ \
|
|
|
.channel = CONFIG_ESP_CONSOLE_UART_NUM, \
|
|
|
@@ -92,8 +93,10 @@ typedef struct {
|
|
|
.tx_gpio_num = -1, \
|
|
|
.rx_gpio_num = -1, \
|
|
|
}
|
|
|
-#endif
|
|
|
+#endif // CONFIG_ESP_CONSOLE_UART_CUSTOM
|
|
|
+#endif // CONFIG_ESP_CONSOLE_UART_DEFAULT || CONFIG_ESP_CONSOLE_UART_CUSTOM
|
|
|
|
|
|
+#if CONFIG_ESP_CONSOLE_USB_CDC || (defined __DOXYGEN__ && SOC_USB_OTG_SUPPORTED)
|
|
|
/**
|
|
|
* @brief Parameters for console device: USB CDC
|
|
|
*
|
|
|
@@ -104,11 +107,10 @@ typedef struct {
|
|
|
|
|
|
} esp_console_dev_usb_cdc_config_t;
|
|
|
|
|
|
-#define ESP_CONSOLE_DEV_CDC_CONFIG_DEFAULT() \
|
|
|
-{ \
|
|
|
-}
|
|
|
+#define ESP_CONSOLE_DEV_CDC_CONFIG_DEFAULT() {}
|
|
|
+#endif // CONFIG_ESP_CONSOLE_USB_CDC || (defined __DOXYGEN__ && SOC_USB_OTG_SUPPORTED)
|
|
|
|
|
|
-#if CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
|
|
|
+#if CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG || (defined __DOXYGEN__ && SOC_USB_SERIAL_JTAG_SUPPORTED)
|
|
|
/**
|
|
|
* @brief Parameters for console device: USB-SERIAL-JTAG
|
|
|
*
|
|
|
@@ -120,8 +122,7 @@ typedef struct {
|
|
|
} esp_console_dev_usb_serial_jtag_config_t;
|
|
|
|
|
|
#define ESP_CONSOLE_DEV_USB_SERIAL_JTAG_CONFIG_DEFAULT() {}
|
|
|
-
|
|
|
-#endif // CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
|
|
|
+#endif // CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG || (defined __DOXYGEN__ && SOC_USB_SERIAL_JTAG_SUPPORTED)
|
|
|
|
|
|
/**
|
|
|
* @brief initialize console module
|
|
|
@@ -304,6 +305,7 @@ struct esp_console_repl_s {
|
|
|
esp_err_t (*del)(esp_console_repl_t *repl);
|
|
|
};
|
|
|
|
|
|
+#if CONFIG_ESP_CONSOLE_UART_DEFAULT || CONFIG_ESP_CONSOLE_UART_CUSTOM
|
|
|
/**
|
|
|
* @brief Establish a console REPL environment over UART driver
|
|
|
*
|
|
|
@@ -326,7 +328,9 @@ struct esp_console_repl_s {
|
|
|
* - ESP_FAIL Parameter error
|
|
|
*/
|
|
|
esp_err_t esp_console_new_repl_uart(const esp_console_dev_uart_config_t *dev_config, const esp_console_repl_config_t *repl_config, esp_console_repl_t **ret_repl);
|
|
|
+#endif // CONFIG_ESP_CONSOLE_UART_DEFAULT || CONFIG_ESP_CONSOLE_UART_CUSTOM
|
|
|
|
|
|
+#if CONFIG_ESP_CONSOLE_USB_CDC || (defined __DOXYGEN__ && SOC_USB_OTG_SUPPORTED)
|
|
|
/**
|
|
|
* @brief Establish a console REPL environment over USB CDC
|
|
|
*
|
|
|
@@ -347,8 +351,9 @@ esp_err_t esp_console_new_repl_uart(const esp_console_dev_uart_config_t *dev_con
|
|
|
* - ESP_FAIL Parameter error
|
|
|
*/
|
|
|
esp_err_t esp_console_new_repl_usb_cdc(const esp_console_dev_usb_cdc_config_t *dev_config, const esp_console_repl_config_t *repl_config, esp_console_repl_t **ret_repl);
|
|
|
+#endif // CONFIG_ESP_CONSOLE_USB_CDC || (defined __DOXYGEN__ && SOC_USB_OTG_SUPPORTED)
|
|
|
|
|
|
-#if CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
|
|
|
+#if CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG || (defined __DOXYGEN__ && SOC_USB_SERIAL_JTAG_SUPPORTED)
|
|
|
/**
|
|
|
* @brief Establish a console REPL (Read-eval-print loop) environment over USB-SERIAL-JTAG
|
|
|
*
|
|
|
@@ -369,7 +374,7 @@ esp_err_t esp_console_new_repl_usb_cdc(const esp_console_dev_usb_cdc_config_t *d
|
|
|
* - ESP_FAIL Parameter error
|
|
|
*/
|
|
|
esp_err_t esp_console_new_repl_usb_serial_jtag(const esp_console_dev_usb_serial_jtag_config_t *dev_config, const esp_console_repl_config_t *repl_config, esp_console_repl_t **ret_repl);
|
|
|
-#endif // CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
|
|
|
+#endif // CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG || (defined __DOXYGEN__ && SOC_USB_SERIAL_JTAG_SUPPORTED)
|
|
|
|
|
|
/**
|
|
|
* @brief Start REPL environment
|