Repository navigation
fix(esp8266): guard SPI dispatch on FASTLED_ALL_PINS_HARDWARE_SPI - #2570
Conversation
Every ESP8266 build fails with `fastspi_esp8266.h: fatal error: SPI.h: No such file or directory` because `chipsets.h` pulls in `platforms/spi_output_template.h` unconditionally for every chipset controller (APA102/P9813/etc), and the ESP8266 dispatch arm forces `platforms/esp/8266/spi_output_template.h` → `fastspi_esp8266.h` → `#include <SPI.h>` — without the matching `lib_deps = SPI` in the ESP8266 board config. Before the dispatch was centralized (commit 8d524ac, 2026-01-16), `fastled_esp8266.h` guarded the include with FASTLED_ALL_PINS_HARDWARE_SPI; the Apollo3 arm of the centralized dispatch preserved that guard, but the ESP8266 arm did not. Restore parity: route ESP8266 to its hardware SPI template only when the user has opted in via the macro (and brought their own SPI lib_dep). Without it, fall through to the bitbang fallback already present at the bottom of the dispatch — matches pre-refactor behavior. Fixes #2569
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR restores the hardware-SPI opt-in guard to the ESP8266 platform dispatch condition in ChangesESP8266 Platform SPI Dispatch
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
fastspi_esp8266.h:7:10: fatal error: SPI.h: No such file or directoryfor every example.chipsets.hunconditionally includesplatforms/spi_output_template.h, which (since commit 8d524ac, 2026-01-16) routes ESP8266 to its hardware SPI template without theFASTLED_ALL_PINS_HARDWARE_SPIguard. The hardware SPI driver#include <SPI.h>(Arduino lib) that the ESP8266 PIO env does not pull in.FASTLED_ALL_PINS_HARDWARE_SPIguard; ESP8266 lost it during the centralization.fastled_esp8266.hguarded the include itself).Fixes #2569
Test plan
bash lint(cpp_linting / meson_linting / etc.) — clean.esp8622job (and every example under it) link successfully again.-DFASTLED_ALL_PINS_HARDWARE_SPIstill get the hardware SPI driver — same dispatch line, just gated.Generated with Claude Code (https://claude.com/claude-code)
Summary by CodeRabbit