diff --git a/esphome/components/uart/uart_component.h b/esphome/components/uart/uart_component.h index 3d2a848462..c260ad3b7a 100644 --- a/esphome/components/uart/uart_component.h +++ b/esphome/components/uart/uart_component.h @@ -31,6 +31,8 @@ const LogString *parity_to_str(UARTParityOptions parity); class UARTComponent { public: + static constexpr size_t RX_FULL_THRESHOLD_UNSET = 0; + // Writes an array of bytes to the UART bus. // @param data A vector of bytes to be written. void write_array(const std::vector &data) { this->write_array(&data[0], data.size()); } @@ -187,7 +189,6 @@ class UARTComponent { InternalGPIOPin *rx_pin_{}; InternalGPIOPin *flow_control_pin_{}; size_t rx_buffer_size_{}; - static constexpr size_t RX_FULL_THRESHOLD_UNSET = 0; // ESP-IDF always sets this at codegen time via set_rx_full_threshold(). // Other platforms (USB UART, Arduino, etc.) leave it unset. size_t rx_full_threshold_{RX_FULL_THRESHOLD_UNSET};