mirror of
https://github.com/esphome/esphome.git
synced 2026-02-28 01:44:20 -07:00
copilot suggestion is overkill and breaks things
This commit is contained in:
@@ -12,13 +12,11 @@ namespace esphome {
|
||||
inline constexpr size_t GPIO_SUMMARY_MAX_LEN = 48;
|
||||
|
||||
#define LOG_PIN(prefix, pin) \
|
||||
do { \
|
||||
if ((pin) != nullptr) { \
|
||||
char pin_buf_[GPIO_SUMMARY_MAX_LEN]; \
|
||||
(pin)->dump_summary(pin_buf_, sizeof(pin_buf_)); \
|
||||
ESP_LOGCONFIG(TAG, prefix "%s", pin_buf_); \
|
||||
} \
|
||||
} while (false)
|
||||
if ((pin) != nullptr) { \
|
||||
char pin_buf_[GPIO_SUMMARY_MAX_LEN]; \
|
||||
(pin)->dump_summary(pin_buf_, sizeof(pin_buf_)); \
|
||||
ESP_LOGCONFIG(TAG, prefix "%s", pin_buf_); \
|
||||
}
|
||||
|
||||
// put GPIO flags in a namespace to not pollute esphome namespace
|
||||
namespace gpio {
|
||||
|
||||
Reference in New Issue
Block a user