diff --git a/esphome/components/debug/debug_component.h b/esphome/components/debug/debug_component.h index 09f08a37ba..5783bc5418 100644 --- a/esphome/components/debug/debug_component.h +++ b/esphome/components/debug/debug_component.h @@ -28,7 +28,7 @@ static constexpr size_t RESET_REASON_BUFFER_SIZE = 128; #ifdef USE_ESP8266 // ESP8266: Use vsnprintf_P to keep format strings in flash (PROGMEM) // Format strings must be wrapped with PSTR() macro -inline size_t buf_append_P(char *buf, size_t size, size_t pos, PGM_P fmt, ...) { +inline size_t buf_append_p(char *buf, size_t size, size_t pos, PGM_P fmt, ...) { if (pos >= size) { return size; } @@ -41,7 +41,7 @@ inline size_t buf_append_P(char *buf, size_t size, size_t pos, PGM_P fmt, ...) { } return std::min(pos + static_cast(written), size); } -#define buf_append(buf, size, pos, fmt, ...) buf_append_P(buf, size, pos, PSTR(fmt), ##__VA_ARGS__) +#define buf_append(buf, size, pos, fmt, ...) buf_append_p(buf, size, pos, PSTR(fmt), ##__VA_ARGS__) #else /// Safely append formatted string to buffer, returning new position (capped at size) __attribute__((format(printf, 4, 5))) inline size_t buf_append(char *buf, size_t size, size_t pos, const char *fmt,