Repository navigation
fix(channels): opt-in driver registration no longer links every platform driver (#4618) - #4630
Merged
Merged
Conversation
…ation (#4618) Add ChannelManager::registry(), which returns the singleton without running platforms::initChannelDrivers(). BusTraits<B>::registerWithManager() and the legacy addLeds<> slim bridges now use it, so a sketch that names one bus links only that engine. ChannelManager::instance() (FastLED.add(cfg), driver queries, Channel dispatch) still registers the platform defaults on first use, so the Channel API keeps working unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: FastLED/FastLED/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (22)
✨ 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 |
zackees
added a commit
that referenced
this pull request
Sep 25, 2026
…, bloat re-pin) - tests: qualify unqualified printf as fl::printf in vocal.hpp, ui.cpp and executor.cpp; single-arg calls were ambiguous with the SDK printf on macOS and Windows (only built under ci-full). - ci/tests: test_esp32_rmt4_reset_timing follows the WAIT_TIME/reset_us rule into SlimBridgeController after #4604. - bloat: claim -17,270 B already on master (#4630, #4603-#4605). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Sep 25, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4618. Part of #4601 / #4580.
What changed
ChannelManager::registry()returns the singleton without runningplatforms::initChannelDrivers().BusTraits<B>::registerWithManager()(Teensy, RP, LPC, ESP32, bit-bang) and the legacyaddLeds<>slim bridges (SlimBridgeController,SlimSpiBridgeController) now useregistry(). A sketch that names one bus links only that engine.ChannelManager::instance()is unchanged. It still registers the platform defaults on first use.FastLED.add(cfg)(which also callsenableAllDrivers()),Channeldispatch, and the driver-query and exclusive-driver APIs all go through it, so the Channel API keeps its runtime-selection behaviour.initChannelDrivers()were the heavy ones (SPI adapter, FlexIO, UART, PIO). SAMD21/51, STM32 and nRF52 register only the SPI adapter, and only frominstance(), so they now also stay out of slim-bridge-only builds. ESP32 was already empty.Bloat (Blink,
bash bloat <board> --example Blink --build)ObjectFLED and the RP PIO engine are still linked. Only the unused defaults were dropped.
Verification
bash compile teensy41|rp2040 --examples Blink,BlinkParallel,Apa102,RGBWW(RGBWW usesFASTLED.add(Channel API),bash compile esp32s3 --examples Apa102: all passbash test --cpp: 314/314 unit and 95/95 examples passbash lint: cleanCode review (
/code-review medium)initChannelDrivers()re-added FlexIO#1 at priority 8 after an opt-in registration at priority 3. That replaced the entry and blocked inwaitForReady(), so the final priority depended on call order. Fixed: init now skips FlexIO#1 when it is already registered.Hardware
Hardware validation is deferred (maintainer decision), tracked in #4623.
🤖 Generated with Claude Code