Skip to content

ESP8266: add a DefaultBus specialization so fl::Bus::AUTO resolves #4941

Closed

Description

@zackees

Problem

fl::Bus::AUTO (and any fl::Channel<Chipset> named without an explicit bus)
resolves through DefaultBus<Chipset>::value
(src/fl/channels/channel_typed.h:49). src/fl/channels/bus.h specializes
DefaultBus for STUB/WASM, ESP32, Teensy 4.x, ARM LPC, RP2040/RP2350 — there
is no ESP8266 branch, so the primary template is undefined and any use fails
to compile.

Evidence

  • src/fl/channels/bus.h — the #if defined(FL_IS_STUB) ... #elif defined(FL_IS_ESP32) ... #elif FL_IS_TEENSY_4X ... #elif FL_IS_ARM_LPC ... #elif FL_IS_RP2040 || FL_IS_RP2350 ... #endif chain has no ESP8266 arm.
  • src/fl/channels/channel_typed.h:49 — resolve_bus<Bus::AUTO, Chipset> →
    DefaultBus<Chipset>::value.

Proposed fix

Add, in the same chain:

#elif defined(FL_IS_ESP8266)
template<> struct DefaultBus<ClocklessChipset> { static constexpr Bus value = Bus::BIT_BANG; };
template<> struct DefaultBus<SpiChipsetConfig> { static constexpr Bus value = Bus::BIT_BANG; };

(BIT_BANG is the shared universal driver src/platforms/shared/bitbang/bus_traits.h;
a native ESP8266 engine would replace the clockless default later.)

Acceptance

A sketch using fl::Channel<ClocklessChipset> / add<Bus::AUTO>() compiles for
ESP8266; a compile test covers it. No #define involved.

Activity

  1. added
    type: feature
    priority: medium
    platform: esp8266
    area: drivers
    on Oct 27, 2026
  2. added a commit that references this issue on Oct 28, 2026
  3. moved this from Triage to Done in FastLED Trackeron Oct 28, 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: mediumtype: feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions