Repository navigation
Description
Guiding principle (do it this way, not with a #define)
Do not gate a driver behind a #define that turns its code on. Select drivers
by template and let the linker drop the ones nothing references. A driver's
translation unit stays alive only when something names it — this repo already has
the mechanism: BusTraits<Bus::X>::instance() / BusSupports<Bus::X, Chipset>
(see src/fl/channels/bus_traits.h, "Naming BusTraits<Bus::X>::instance()
anywhere in the program is what causes the linker to keep the driver's
translation unit. If no template instantiation references it, the driver TU is
dead-stripped. See #2428.").
So on a given target the unused drivers are eliminated automatically — which is
most of them — without a compile-time enable flag, and the whole program is still
type-checked. Opt-in defines (FASTLED_ESP8266_UART, FL_ESP8266_EMBEDDED_FS,
FASTLED_ALL_PINS_HARDWARE_SPI, ...) move this decision to the build system and
prevent the driver from being link-eliminated or compile-verified.
Sub-issues (one per driver)
- ESP8266: replace code-enabling defines with template selection + linker elimination #4940 — ESP8266: replace code-enabling defines with template selection + linker elimination
- ESP8266: add a
DefaultBusspecialization sofl::Bus::AUTOresolves #4941 — ESP8266: add aDefaultBusspecialization sofl::Bus::AUTOresolves - ESP8266: expose native HSPI as a channel/
Bus::SPIdriver; retireFASTLED_ALL_PINS_HARDWARE_SPI#4942 — ESP8266: expose native HSPI as a channel/Bus::SPIdriver; retireFASTLED_ALL_PINS_HARDWARE_SPI - ESP8266: I2S output engine (clockless/parallel via the I2S peripheral) #4943 — ESP8266: I2S output engine (clockless/parallel via the I2S peripheral)
- ESP8266: UART WS2812 driver should be template-selected, not
FASTLED_ESP8266_UART#4944 — ESP8266: UART WS2812 driver should be template-selected, notFASTLED_ESP8266_UART - ESP8266:
fl::RxChannelinput driver (GPIO-ISR) — none exists #4945 — ESP8266:fl::RxChannelinput driver (GPIO-ISR) — none exists - ESP8266: OTA update support (no path today) #4946 — ESP8266: OTA update support (no path today)
- ESP8266: embedded LittleFS — retire the
FL_ESP8266_EMBEDDED_FSdefine-gate #4947 — ESP8266: embedded LittleFS — retire theFL_ESP8266_EMBEDDED_FSdefine-gate - ESP8266: dedicated audio-input backend (currently a generic Arduino-I2S fallback) #4948 — ESP8266: dedicated audio-input backend (currently a generic Arduino-I2S fallback)
Already implemented on ESP8266 (context)
- Clockless single-lane (cycle-counter):
clockless_esp8266.h - Clockless multi-lane blockless:
clockless_block_esp8266.h - Native HSPI (SPI1, GPIO13/14):
fastspi_esp8266_hspi.h,spi_hspi_clock.h - Software SPI bit-bang (any pair):
spi_output_template.h→ sharedgeneric_software_spi.h - Shared
Bus::BIT_BANGchannel driver:src/platforms/shared/bitbang/ - UART1 WS2812 (opt-in today):
fastled_esp8266_uart.h
Not applicable (hardware absent — not gaps)
RMT, PARLIO, LCD_CAM, LCD_SPI, I2S_SPI, DUAL/QUAD/OCTAL_SPI, BLE.
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
DefaultBusspecialization sofl::Bus::AUTOresolves #4941Bus::SPIdriver; retireFASTLED_ALL_PINS_HARDWARE_SPI#4942FASTLED_ESP8266_UART#4944fl::RxChannelinput driver (GPIO-ISR) — none exists #4945FL_ESP8266_EMBEDDED_FSdefine-gate #49472 remaining items
feat(esp8266): resolve fl::Bus::AUTO via a DefaultBus specialization
feat(esp8266): UART WS2812 engine as Bus::UART; retire FASTLED_ESP826…
feat(esp8266): embedded LittleFS is automatic; retire FL_ESP8266_EMBE…
docs(esp8266): document the shared Arduino-I2S audio-input path (Fast…
feat(lint): flag a new driver-enabling define; document the template …
feat(esp8266): OTA via the core's ArduinoOTA, in its own component TU (…
feat(esp8266): native I2S output engine (Bus::FLEX_IO), RX-validated (F…
feat(esp8266): fl::RxChannel via the I2S RX hardware receiver (FastLE…
test(esp8266): prove the I2S TX->RX capture loopback in software (Fas…
feat(autoresearch): esp8266 i2sLoopback bench (FastLED#4943/FastLED#4945
feat(autoresearch): esp8266 spiLoopback HSPI capture bench (FastLED#4942
fix(autoresearch): route the HSPI MISO pad so spiLoopback captures on…
zackees commentedon Nov 21, 2026
Resolved by #4950, #4951, #4952, #4953, #4954, #4955, #4956, #4957, #4958 (all sub-issues #4940-#4948 closed). Verified: master has DefaultBus in src/platforms/esp/8266/channel_drivers_esp8266.impl.hpp, template-selected HSPI/UART/I2S bus traits (hspi_bus_traits.h, uart_bus_traits.h, i2s_bus_traits.h), rx_device_i2s_rx.h, ota/, and no remaining code gates on FASTLED_ESP8266_UART or FL_ESP8266_EMBEDDED_FS.