Skip to content

docs(channels): README accuracy sweep + drop legacy framing - #2466

Merged
zackees merged 1 commit into
masterfrom
docs/channels-readme-accuracy-pass
May 12, 2026
Merged

zackees merged 1 commit into
masterfrom
docs/channels-readme-accuracy-pass

Conversation

@zackees

@zackees zackees commented May 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Refresh the channels README and one related code docstring against the current API surface (post-#2459 / #2460 / #2465). The user asked to find outdated information and to drop legacy framing — this is the result.

What changed

README:

  • addLeds<..., fl::Bus::X> is no longer "planned". Section text now lists both compile-time entry points side-by-side (TypedChannel<>::create() and addLeds<..., fl::Bus::X>). The "the planned addLeds<..., fl::Bus::RMT> trailing template parameter — see Channel API: legacy FastLED.addLeds<..., fl::Bus B> trailing template parameter #2460" note is removed: that shipped via feat(channels): addLeds<..., fl::Bus B> trailing parameter (closes #2460) #2465.
  • Drop "Backwards Compatible API" framing for addLeds<>. Both the Channel API and the template addLeds<> API are first-class; pick by call-site shape, not by maturity. The "Backwards Compatible API" section is renamed "Template addLeds<> API" and the "API Status" section is rewritten to "Which API to Use".
  • Drop "Legacy" labels on the active addLeds<> bus-pinning section, the bus-miss diagnostic remediation list, and the 3.10.3-era framings around enableDrivers<> / FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY.
  • Engine Priority table now matches fl/channels/bus_priorities.h exactly:
    • ESP32 family: I2S_SPI / LCD_SPI (10), PARLIO (4), LCD_RGB (3), RMT / LCD_CLOCKLESS (2), I2S (1), SPI (0), UART (-1).
    • Teensy 4.x: FLEX_IO / OBJECT_FLED (1).
    • Portable: BIT_BANG / STUB (0).
    • Old table only listed PARLIO/RMT/I2S/SPI/UART and labeled PARLIO as "Highest" — but I2S_SPI and LCD_SPI are higher at 10.
  • Rename "Engine Affinity" section to "Per-Channel Bus Pinning (Mixed-Timing Parallel Output)". The section was named after the removed string mAffinity field; the body already used the modern cfg.options.mBus API.
  • Update the bus-miss diagnostic description to list all three remediations the actual FL_ERROR emits (fl::enableDrivers<>, FastLED.enableAllDrivers(), FastLED.addLeds<..., fl::Bus::X>).
  • Reference section refresh: add fl/channels/bus_priorities.h, list busKeepAlive<B>(), expand the ChannelManager method list with setDriverPriority / setDriverEnabled / setExclusiveDriver.

src/fl/channels/channel.h:

  • Channel::create() docstring no longer references the removed config.affinity field. Replaced with current cfg.options.mBus semantics and the showPixels() fallback behavior.

Test plan

  • bash lint --cpp: clean
  • No code behavior change — README + one docstring only.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified FastLED Channels API documentation to better explain the driver dispatch model, including compile-time versus runtime bus and driver selection.
    • Expanded guidance on per-channel bus pinning, fallback diagnostics behavior, and driver registration mechanisms.
    • Enhanced Channel::create documentation with details on driver pinning and fallback behavior during pixel display operations.

Refresh the channels README and one related code docstring against the
current API surface (post #2459 / #2460 / #2465):

README:
  - Compile-time bus binding now lists both entry points equally
    (`fl::TypedChannel<...>::create()` and `addLeds<..., fl::Bus::X>`).
    The "planned addLeds<..., fl::Bus::X> — see #2460" note is gone:
    that feature shipped via #2465.
  - Drop "Backwards Compatible API" framing for `addLeds<>` — both the
    Channel API and the template `addLeds<>` API are first-class; pick by
    call-site shape, not by maturity.
  - Drop "Legacy `addLeds<>` Bus pinning" / "legacy FastLED.addLeds<...>
    shape" labels — these are the actively-supported entry points.
  - Expand the Engine Priority table to match `fl/channels/bus_priorities.h`
    exactly: I2S_SPI / LCD_SPI (10), PARLIO (4), LCD_RGB (3), RMT / LCD_CLOCKLESS
    (2), I2S / FLEX_IO / OBJECT_FLED (1), SPI / BIT_BANG / STUB (0),
    UART (-1). Split by platform family (ESP32 / Teensy 4.x / Portable).
  - Rename "Engine Affinity" section to "Per-Channel Bus Pinning (Mixed-
    Timing Parallel Output)" — the section was named after the removed
    string `mAffinity` field. Update internal back-references.
  - Trim 3.10.3-era "backstory" framing on `enableDrivers<>` /
    `FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY` — describe what the toggle
    does today, not what it restores from history.
  - Update bus-miss diagnostic description to list all three remediations
    the actual `FL_ERROR` emits (enableDrivers / enableAllDrivers /
    addLeds<..., fl::Bus::X>).
  - Reference section: add `fl/channels/bus_priorities.h`, list
    `busKeepAlive<B>()`, expand the `ChannelManager` method list to
    include `setDriverPriority` / `setDriverEnabled` / `setExclusiveDriver`.

src/fl/channels/channel.h:
  - `Channel::create()` docstring no longer references the removed
    `config.affinity` field. Replace with current `cfg.options.mBus`
    behavior + the showPixels() fallback semantics.

No code behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 042d3daf-c22a-4cbd-ac58-0ffe39084bb3

📥 Commits

Reviewing files that changed from the base of the PR and between 6418e81 and 1c49962.

📒 Files selected for processing (2)
  • src/fl/channels/README.md
  • src/fl/channels/channel.h

📝 Walkthrough

Walkthrough

This PR updates FastLED Channels API documentation to clarify compile-time vs runtime bus/driver selection, document the optional fl::Bus template parameter for addLeds<>, explain mBus-based driver pinning, and describe bus-miss diagnostics with one-shot FL_ERROR fallback behavior.

Changes

FastLED Channels API Documentation Clarification

Layer / File(s) Summary
Dispatch modes and addLeds<> convenience API
src/fl/channels/README.md
Rewrote "dispatch modes" section distinguishing compile-time TypedChannel and addLeds<> template binding from runtime FastLED.add(cfg) with cfg.options.mBus. Repositioned addLeds<> as one-line convenience, added note that it constructs ChannelConfig, and documented optional trailing fl::Bus B = fl::Bus::AUTO parameter on all variants. Updated busName() documentation to emphasize canonical driver strings and exact matching.
Bus pinning, keep-alive, and runtime mBus routing
src/fl/channels/README.md
Documented ODR keep-alive behavior via fl::BusTraits<B>::instance and fl::busKeepAlive<B>() for addLeds bus pinning. Clarified conditional runtime routing for SPI variants and guidance to use FastLED.add(cfg) with cfg.options.mBus for full runtime routing on other controllers.
Custom driver registration and opt-in flow
src/fl/channels/README.md
Inserted guidance for custom/third-party drivers not in fl::Bus enum, detailing manager.addDriver(priority, driver) with priority/exclusive selection. Reworked opt-in registration with enableAllDrivers() using all_drivers.h, clarified FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY effect on auto-registration, and updated ChannelManager::addDriver() 2-arg semantics with empty getName() rejection behavior.
Bus-miss diagnostics, API selection, and parallel patterns
src/fl/channels/README.md
Extended bus-miss section to specify one-shot FL_ERROR from Channel::showPixels() when non-AUTO cfg.options.mBus resolves to unregistered driver (including two diagnostic cases: not registered vs rejected by canHandle()). Replaced "Engine Affinity" heading with "Per-Channel Bus Pinning (Mixed-Timing Parallel Output)" and expanded "Which API to Use" section including per-channel mBus mixing.
Custom engine naming, headers reference, and Channel::create
src/fl/channels/README.md, src/fl/channels/channel.h
Clarified custom engine getName() guidance to match busName(cfg.options.mBus) and naming format requirements. Updated headers reference list to reflect current API structure. Updated Channel::create documentation to describe optional mBus driver pinning and showPixels() fallback with one-shot FL_ERROR on driver-name miss, replacing previous "affinity" terminology.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

  • FastLED/FastLED#2449: Documentation describes behavior implemented by TypedChannel/ChannelConfigOf and FastLED.add<Bus,Chipset> changes.
  • FastLED/FastLED#2465: Documentation aligns with addLeds<..., fl::Bus B> bus parameter, busKeepAlive, and runtime cfg.options.mBus code changes.
  • FastLED/FastLED#2461: Documentation describes mBus dispatch and fallback behavior introduced by mAffinity-to-mBus replacement.

Poem

🐰 Channels flow like springtime streams,
Where buses route through typed daydreams,
When drivers miss, one whisper's sent—
An error soft, a gentle hint! 💫

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/channels-readme-accuracy-pass

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackees
zackees merged commit 0a5b9e0 into master May 12, 2026
5 of 7 checks passed
@zackees
zackees deleted the docs/channels-readme-accuracy-pass branch August 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant