mirror of
https://github.com/esphome/esphome.git
synced 2026-02-28 01:44:20 -07:00
[uart] Make is_default_uart0_pin constexpr
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,9 @@ static const char *const TAG = "uart.idf";
|
||||
/// Check if a pin number matches one of the default UART0 GPIO pins.
|
||||
/// These pins may have residual state from the boot console that requires
|
||||
/// explicit reset before UART reconfiguration (ESP-IDF issue #17459).
|
||||
static bool is_default_uart0_pin(int8_t pin_num) { return pin_num == U0TXD_GPIO_NUM || pin_num == U0RXD_GPIO_NUM; }
|
||||
static constexpr bool is_default_uart0_pin(int8_t pin_num) {
|
||||
return pin_num == U0TXD_GPIO_NUM || pin_num == U0RXD_GPIO_NUM;
|
||||
}
|
||||
|
||||
uart_config_t IDFUARTComponent::get_config_() {
|
||||
uart_parity_t parity = UART_PARITY_DISABLE;
|
||||
|
||||
Reference in New Issue
Block a user