[libretiny] Fix millis() ambiguity on BK72XX (#12534)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Jonathan Swoboda
2025-12-18 07:50:31 -05:00
committed by GitHub
parent ca47bad90a
commit 663a4304e0

View File

@@ -382,10 +382,15 @@ def include_file(path: Path, basename: Path, is_c_header: bool = False):
ARDUINO_GLUE_CODE = """\
#undef yield
#define yield() esphome::yield()
#undef millis
#define millis() esphome::millis()
#undef micros
#define micros() esphome::micros()
#undef delay
#define delay(x) esphome::delay(x)
#undef delayMicroseconds
#define delayMicroseconds(x) esphome::delayMicroseconds(x)
"""
@@ -536,7 +541,7 @@ async def to_code(config: ConfigType) -> None:
if config[CONF_DEBUG_SCHEDULER]:
cg.add_define("ESPHOME_DEBUG_SCHEDULER")
if CORE.using_arduino and not CORE.is_bk72xx:
if CORE.using_arduino:
CORE.add_job(add_arduino_global_workaround)
if config[CONF_INCLUDES]: