From 7d9a081a8409dbebc566522ec1a7d5fc75158e76 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 7 Mar 2026 17:49:01 -1000 Subject: [PATCH] Make RX_FULL_THRESHOLD_UNSET public Needed since modbus accesses it from outside the class. --- esphome/components/uart/uart_component.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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};