From 71d9dff3fc30688e80bd2f74c10b533df4413748 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 30 Dec 2025 13:46:36 -1000 Subject: [PATCH] fix --- esphome/core/gpio.cpp | 4 ++-- esphome/core/gpio.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/core/gpio.cpp b/esphome/core/gpio.cpp index c6927717a6..21e88b5b6d 100644 --- a/esphome/core/gpio.cpp +++ b/esphome/core/gpio.cpp @@ -11,13 +11,13 @@ void log_pin(const char *tag, const __FlashStringHelper *prefix, GPIOPin *pin) { char prefix_buf[LOG_PIN_PREFIX_MAX_LEN]; strncpy_P(prefix_buf, reinterpret_cast(prefix), sizeof(prefix_buf) - 1); prefix_buf[sizeof(prefix_buf) - 1] = '\0'; - log_pin_with_prefix_(tag, prefix_buf, pin); + log_pin_with_prefix(tag, prefix_buf, pin); } #else void log_pin(const char *tag, const char *prefix, GPIOPin *pin) { if (pin == nullptr) return; - log_pin_with_prefix_(tag, prefix, pin); + log_pin_with_prefix(tag, prefix, pin); } #endif diff --git a/esphome/core/gpio.h b/esphome/core/gpio.h index 8870bb3324..f2f85e18bc 100644 --- a/esphome/core/gpio.h +++ b/esphome/core/gpio.h @@ -145,7 +145,7 @@ inline size_t GPIOPin::dump_summary(char *buffer, size_t len) const { inline std::string GPIOPin::dump_summary() const { return {}; } // Inline helper for log_pin - allows compiler to inline into log_pin in gpio.cpp -inline void log_pin_with_prefix_(const char *tag, const char *prefix, GPIOPin *pin) { +inline void log_pin_with_prefix(const char *tag, const char *prefix, GPIOPin *pin) { char buffer[GPIO_SUMMARY_MAX_LEN]; size_t len = pin->dump_summary(buffer, sizeof(buffer)); len = std::min(len, sizeof(buffer) - 1);