Skip to content

ESP8266 driver coverage: missing engines + replace code-enabling defines with template/linker elimination #4949

Closed
9 of 9 issues completed

Description

@zackees

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)

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 → shared generic_software_spi.h
  • Shared Bus::BIT_BANG channel 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

Sub-issues

9 of 9 Issues completed
Loading 9 sub-issues

Activity

  1. added
    type: feature
    priority: medium
    platform: esp8266
    area: drivers
    on Oct 27, 2026
  2. 2 remaining items

  3. zackees commented on Nov 21, 2026

    @zackees
    MemberAuthor

    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.

  4. moved this from Triage to Done in FastLED Trackeron Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: driversplatform: esp8266priority: mediumsanitizedtype: feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions