mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-28 11:28:43 +00:00
5fac0b7386
- Move the linux repl chip and deprecate chip related functions - Update location of driver specific default config - Add missing comments on the newly added functions in the affected components.
50 lines
1.8 KiB
C
50 lines
1.8 KiB
C
/*
|
|
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "sdkconfig.h"
|
|
|
|
#if CONFIG_ESP_CONSOLE_UART_DEFAULT || CONFIG_ESP_CONSOLE_UART_CUSTOM
|
|
#include "soc/uart_pins.h"
|
|
#if CONFIG_ESP_CONSOLE_UART_CUSTOM
|
|
#define ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT() \
|
|
{ \
|
|
.channel = CONFIG_ESP_CONSOLE_UART_NUM, \
|
|
.baud_rate = CONFIG_ESP_CONSOLE_UART_BAUDRATE, \
|
|
.tx_gpio_num = (CONFIG_ESP_CONSOLE_UART_TX_GPIO >= 0) ? CONFIG_ESP_CONSOLE_UART_TX_GPIO : U0TXD_GPIO_NUM, \
|
|
.rx_gpio_num = (CONFIG_ESP_CONSOLE_UART_RX_GPIO >= 0) ? CONFIG_ESP_CONSOLE_UART_RX_GPIO : U0RXD_GPIO_NUM, \
|
|
}
|
|
#else
|
|
#define ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT() \
|
|
{ \
|
|
.channel = CONFIG_ESP_CONSOLE_UART_NUM, \
|
|
.baud_rate = CONFIG_ESP_CONSOLE_UART_BAUDRATE, \
|
|
.tx_gpio_num = -1, \
|
|
.rx_gpio_num = -1, \
|
|
}
|
|
#endif // CONFIG_ESP_CONSOLE_UART_CUSTOM
|
|
#endif // CONFIG_ESP_CONSOLE_UART_DEFAULT || CONFIG_ESP_CONSOLE_UART_CUSTOM
|
|
|
|
#if CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG || (defined __DOXYGEN__ && SOC_USB_SERIAL_JTAG_SUPPORTED)
|
|
#define ESP_CONSOLE_DEV_USB_SERIAL_JTAG_CONFIG_DEFAULT() {}
|
|
#endif // CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG || (defined __DOXYGEN__ && SOC_USB_SERIAL_JTAG_SUPPORTED)
|
|
|
|
#if CONFIG_ESP_CONSOLE_USB_CDC || (defined __DOXYGEN__ && SOC_USB_OTG_SUPPORTED)
|
|
#define ESP_CONSOLE_DEV_CDC_CONFIG_DEFAULT() {}
|
|
#endif // CONFIG_ESP_CONSOLE_USB_CDC || (defined __DOXYGEN__ && SOC_USB_OTG_SUPPORTED)
|
|
|
|
#if CONFIG_IDF_TARGET_LINUX
|
|
#define ESP_CONSOLE_DEV_LINUX_CONFIG_DEFAULT() {}
|
|
#endif // CONFIG_IDF_TARGET_LINUX
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|