You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
esp: converge Arduino-vs-native dispatch on capability detection (FL_HAS_INCLUDE of IDF driver headers), not #ifdef ARDUINO #3722
Mechanism 3 is the right model: it asks "is the Espressif driver available?" instead of "is Arduino present?", so the native path is taken even under Arduino (the IDF drivers ship inside every Arduino-ESP32 install), and bare-IDF builds need no special-casing. Mechanisms 1 and 2 invert the priority — they make Arduino the default whenever it exists, which is exactly the dependency direction #3715 removes.
Fix
Pure refactor, no behavior change intended on IDF-capable toolchains:
Define the convention in one place (e.g. a short section in src/platforms/esp/32/ARCHITECTURE.md + a FL_ESP_HAS_IDF_DRIVERS-style umbrella macro if useful): dispatch on presence of the Espressif driver header, never on ARDUINO.
Convert the mechanism-1/2 sites as their sub-issues land (SPI, serial IO, memory, timing all reference this convention). This issue tracks the convention doc + any remaining stragglers after those merge.
Legit remaining uses of ARDUINO after this: platform identification in is_esp.h (ARDUINO_ARCH_ESP32/ESP8266), and genuinely Arduino-only opt-in features (e.g. io_arduino.hpp opt-in). Document both as the allowed exceptions.
Acceptance criteria
grep -rn "defined(ARDUINO)" src/platforms/esp/ hits only the documented exceptions list.
Convention documented in ARCHITECTURE.md and referenced from agents/docs/cpp-standards.md if appropriate.
No behavior change on any CI leg (this is a dispatch-mechanism refactor, not a backend change).
Activity