mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 10:38:38 +00:00
[esp8266] Suppress clang-tidy for __wrap_millis reserved identifier
The __wrap_ prefix is required by the GNU linker's --wrap feature. It's a reserved identifier by C++ rules but mandated by the toolchain.
This commit is contained in:
@@ -130,6 +130,7 @@ extern "C" void resetPins() { // NOLINT
|
||||
|
||||
// Linker wrap: redirect all ::millis() calls (Arduino libs, ISRs) to our accumulator.
|
||||
// Requires -Wl,--wrap=millis in build flags (added by __init__.py).
|
||||
// NOLINTNEXTLINE(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp,readability-identifier-naming)
|
||||
extern "C" uint32_t IRAM_ATTR __wrap_millis() { return esphome::millis(); }
|
||||
|
||||
#endif // USE_ESP8266
|
||||
|
||||
Reference in New Issue
Block a user