Repository navigation
Feat/channels bus traits drivers - #2435
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (7)
📝 WalkthroughWalkthroughThis PR introduces the IChannel polymorphic interface, makes Channel implement it (id()/name() overrides), updates ChannelEvents to accept const IChannel& for channel parameters, updates docs/examples to match, updates tests to use IChannel, and adds explicit KeyboardInterrupt handling in test utilities. ChangesIChannel Interface and ChannelEvents Integration
Test Runner KeyboardInterrupt Handling
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (4)
src/platforms/esp/32/drivers/rmt/rmt_4/bus_traits.h (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse compiler control macros instead of raw
#pragma once.Replace the raw
#pragma oncedirective with the appropriate FastLED compiler control macro.As per coding guidelines: "Use FastLED compiler control macros from fl/stl/compiler_control.h instead of raw
#pragmadirectives".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/platforms/esp/32/drivers/rmt/rmt_4/bus_traits.h` at line 1, Replace the raw `#pragma once` in bus_traits.h with the FastLED compiler control macros: include "fl/stl/compiler_control.h" and wrap the header with the begin/end compiler-control macros provided by that header (remove the `#pragma once` and use the FastLED macros instead to ensure consistent compiler directive handling).src/platforms/esp/32/drivers/i2s_spi/bus_traits.h (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse compiler control macros instead of raw
#pragma once.Same as in
src/platforms/arm/teensy/teensy4_common/drivers/flexio/bus_traits.h: replace the raw#pragma oncedirective with the appropriate FastLED compiler control macro.As per coding guidelines: "Use FastLED compiler control macros from fl/stl/compiler_control.h instead of raw
#pragmadirectives".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/platforms/esp/32/drivers/i2s_spi/bus_traits.h` at line 1, Replace the raw "#pragma once" in src/platforms/esp/32/drivers/i2s_spi/bus_traits.h with the FastLED compiler control macros: add `#include` <fl/stl/compiler_control.h> at the top and wrap the header with the project's header guard macros (e.g., FASTLED_BEGIN_HEADER / FASTLED_END_HEADER or the equivalent macros provided by fl/stl/compiler_control.h) so the file uses the FastLED compiler control macros instead of a raw pragma.src/platforms/esp/32/drivers/rmt/rmt_5/bus_traits.h (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse compiler control macros instead of raw
#pragma once.Replace the raw
#pragma oncedirective with the appropriate FastLED compiler control macro.As per coding guidelines: "Use FastLED compiler control macros from fl/stl/compiler_control.h instead of raw
#pragmadirectives".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/platforms/esp/32/drivers/rmt/rmt_5/bus_traits.h` at line 1, Replace the raw "#pragma once" in src/platforms/esp/32/drivers/rmt/rmt_5/bus_traits.h with the FastLED compiler control macros: remove the pragma, add `#include` "fl/stl/compiler_control.h", and wrap the header with the provided header-guard macros from that file (use the library's header-enter and header-exit macros, e.g., FL_COMPILER_CONTROL_HEADER / FL_COMPILER_CONTROL_FOOTER or the equivalent names defined in fl/stl/compiler_control.h) so the file uses the FastLED compiler control macros instead of a raw pragma.src/fl/channels/ichannel.h (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse compiler control macros instead of raw
#pragma once.Replace the raw
#pragma oncedirective with the appropriate FastLED compiler control macro fromfl/stl/compiler_control.h.As per coding guidelines: "Use FastLED compiler control macros from fl/stl/compiler_control.h instead of raw
#pragmadirectives".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/fl/channels/ichannel.h` at line 1, Replace the raw `#pragma once` in src/fl/channels/ichannel.h: remove the `#pragma once` line, add `#include "fl/stl/compiler_control.h"` and wrap this header's declarations with the FastLED compiler control macros provided by that header (use the begin/end or push/pop macros defined there) so the file uses the library's compiler control instead of the raw pragma.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/platforms/esp/32/drivers/uart/bus_traits.h`:
- Around line 32-42: The instance() singleton constructs Holder using
fl::make_shared (via UartPeripheralEsp and Driver) which assumes allocations
never return nullptr; under -fno-exceptions fl::aligned_alloc (and
fl::make_shared) can return null and will be dereferenced causing a crash. Fix
by changing Holder to hold fl::optional<fl::shared_ptr<UartPeripheralEsp>> and
fl::optional<fl::shared_ptr<Driver>> (or at least make driver optional), check
the optionals after attempting fl::make_shared in Holder's constructor and
handle allocation failure by returning a safe error path from instance() (e.g.,
return a null/optional result or call a controlled abort/assertion);
alternatively, if you prefer the other approach, make fl::aligned_alloc
explicitly abort/assert on allocation failure so the current no-check pattern is
explicit—apply the selected fix to the instance(), Holder, and analogous
singleton patterns that use fl::make_shared.
In `@test.py`:
- Around line 195-197: The except block currently catches KeyboardInterrupt,
calls handle_keyboard_interrupt(ki), then re-raises, which allows watchdog
threads (deadman_timer and watchdog_timer) to exit before they can call
os._exit(); instead, suppress KeyboardInterrupt in this best-effort cleanup path
by removing the re-raise so the cleanup returns normally after
handle_keyboard_interrupt(ki). Apply the same change to the other occurrence
referenced (the second except block around lines ~200-202) so both best-effort
cleanup sites called by deadman_timer() and watchdog_timer() do not propagate
KeyboardInterrupt.
---
Duplicate comments:
In `@src/fl/channels/ichannel.h`:
- Line 1: Replace the raw `#pragma once` in src/fl/channels/ichannel.h: remove
the `#pragma once` line, add `#include "fl/stl/compiler_control.h"` and wrap
this header's declarations with the FastLED compiler control macros provided by
that header (use the begin/end or push/pop macros defined there) so the file
uses the library's compiler control instead of the raw pragma.
In `@src/platforms/esp/32/drivers/i2s_spi/bus_traits.h`:
- Line 1: Replace the raw "#pragma once" in
src/platforms/esp/32/drivers/i2s_spi/bus_traits.h with the FastLED compiler
control macros: add `#include` <fl/stl/compiler_control.h> at the top and wrap the
header with the project's header guard macros (e.g., FASTLED_BEGIN_HEADER /
FASTLED_END_HEADER or the equivalent macros provided by
fl/stl/compiler_control.h) so the file uses the FastLED compiler control macros
instead of a raw pragma.
In `@src/platforms/esp/32/drivers/rmt/rmt_4/bus_traits.h`:
- Line 1: Replace the raw `#pragma once` in bus_traits.h with the FastLED
compiler control macros: include "fl/stl/compiler_control.h" and wrap the header
with the begin/end compiler-control macros provided by that header (remove the
`#pragma once` and use the FastLED macros instead to ensure consistent compiler
directive handling).
In `@src/platforms/esp/32/drivers/rmt/rmt_5/bus_traits.h`:
- Line 1: Replace the raw "#pragma once" in
src/platforms/esp/32/drivers/rmt/rmt_5/bus_traits.h with the FastLED compiler
control macros: remove the pragma, add `#include` "fl/stl/compiler_control.h", and
wrap the header with the provided header-guard macros from that file (use the
library's header-enter and header-exit macros, e.g., FL_COMPILER_CONTROL_HEADER
/ FL_COMPILER_CONTROL_FOOTER or the equivalent names defined in
fl/stl/compiler_control.h) so the file uses the FastLED compiler control macros
instead of a raw pragma.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 6eef103b-0956-4945-9dd5-500f5b766033
📒 Files selected for processing (34)
src/FastLED.hsrc/fl/channels/README.mdsrc/fl/channels/bus.hsrc/fl/channels/channel.hsrc/fl/channels/channel_events.hsrc/fl/channels/ichannel.hsrc/platforms/arm/teensy/teensy4_common/drivers/flexio/_build.cpp.hppsrc/platforms/arm/teensy/teensy4_common/drivers/flexio/bus_traits.hsrc/platforms/arm/teensy/teensy4_common/drivers/objectfled/_build.cpp.hppsrc/platforms/arm/teensy/teensy4_common/drivers/objectfled/bus_traits.hsrc/platforms/esp/32/drivers/i2s/_build.cpp.hppsrc/platforms/esp/32/drivers/i2s/bus_traits.hsrc/platforms/esp/32/drivers/i2s_spi/_build.cpp.hppsrc/platforms/esp/32/drivers/i2s_spi/bus_traits.hsrc/platforms/esp/32/drivers/lcd_cam/_build.cpp.hppsrc/platforms/esp/32/drivers/lcd_cam/bus_traits.hsrc/platforms/esp/32/drivers/lcd_spi/_build.cpp.hppsrc/platforms/esp/32/drivers/lcd_spi/bus_traits.hsrc/platforms/esp/32/drivers/parlio/_build.cpp.hppsrc/platforms/esp/32/drivers/parlio/bus_traits.hsrc/platforms/esp/32/drivers/rmt/rmt_4/_build.cpp.hppsrc/platforms/esp/32/drivers/rmt/rmt_4/bus_traits.hsrc/platforms/esp/32/drivers/rmt/rmt_5/_build.cpp.hppsrc/platforms/esp/32/drivers/rmt/rmt_5/bus_traits.hsrc/platforms/esp/32/drivers/spi/_build.cpp.hppsrc/platforms/esp/32/drivers/spi/bus_traits.hsrc/platforms/esp/32/drivers/uart/_build.cpp.hppsrc/platforms/esp/32/drivers/uart/bus_traits.hsrc/platforms/shared/bitbang/_build.cpp.hppsrc/platforms/shared/bitbang/bus_traits.htest.pytests/fastled_core.cpptests/fl/channels/driver.cpptests/fl/chipsets/ucs7604.cpp
| static Driver& instance() FL_NOEXCEPT { | ||
| struct Holder { | ||
| fl::shared_ptr<UartPeripheralEsp> peripheral; | ||
| fl::shared_ptr<Driver> driver; | ||
| Holder() FL_NOEXCEPT | ||
| : peripheral(fl::make_shared<UartPeripheralEsp>()), | ||
| driver(fl::make_shared<Driver>(peripheral)) {} | ||
| }; | ||
| static Holder gHolder; | ||
| return *gHolder.driver; | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify fl::make_shared allocation failure behavior and similar patterns in codebase.
# Test 1: Find fl::make_shared implementation
echo "=== Finding fl::make_shared implementation ==="
ast-grep --pattern $'namespace fl {
$$$
make_shared($$$) {
$$$
}
$$$
}'
# Test 2: Check for similar singleton patterns with make_shared
echo "=== Checking similar static singleton patterns ==="
rg -A 5 'static.*fl::make_shared' --type=cpp -C 3
# Test 3: Check if codebase uses -fno-exceptions
echo "=== Checking for exception handling flags ==="
rg -g 'CMakeLists.txt' -g 'Makefile' -g '*.cmake' -i 'fno-exceptions|exceptions'
# Test 4: Look for null checks after make_shared calls
echo "=== Sample null checks after make_shared ==="
rg -A 2 'fl::make_shared' --type=cpp | rg -B 2 'if.*null|assert'Repository: FastLED/FastLED
Length of output: 22715
🏁 Script executed:
#!/bin/bash
# Find fl:: namespace definition and make_shared implementation
echo "=== Searching for fl namespace and shared_ptr implementation ==="
fd -e h -e hpp | xargs grep -l "namespace fl" | head -10
echo ""
echo "=== Looking for shared_ptr definition in fl ==="
rg "template.*shared_ptr|class shared_ptr" --type=hpp | head -20
echo ""
echo "=== Checking fl/stl directory for memory/pointer implementations ==="
fd "shared_ptr|make_shared" src/fl/stl --type f
echo ""
echo "=== Searching for fl::make_shared definition ==="
rg "make_shared\s*\(" src/fl/stl --type=hpp -A 3 | head -30Repository: FastLED/FastLED
Length of output: 713
🏁 Script executed:
#!/bin/bash
# Read the fl::shared_ptr implementation files
echo "=== Reading shared_ptr.h ==="
wc -l src/fl/stl/shared_ptr.h
head -100 src/fl/stl/shared_ptr.h
echo ""
echo "=== Checking for make_shared in shared_ptr.h ==="
grep -n "make_shared" src/fl/stl/shared_ptr.h
echo ""
echo "=== Reading shared_ptr.cpp.hpp ==="
wc -l src/fl/stl/shared_ptr.cpp.hpp
head -100 src/fl/stl/shared_ptr.cpp.hpp
echo ""
echo "=== Searching for make_shared implementation ==="
grep -n "make_shared" src/fl/stl/shared_ptr.cpp.hpp | head -10Repository: FastLED/FastLED
Length of output: 6686
🏁 Script executed:
#!/bin/bash
# Find the allocate function implementation
echo "=== Searching for allocate function in fl::stl ==="
rg -n "template.*allocate|allocate\s*<" src/fl/stl/shared_ptr.h | head -20
echo ""
echo "=== Looking for allocate in other stl files ==="
fd -type f src/fl/stl | xargs grep -l "allocate" 2>/dev/null
echo ""
echo "=== Searching for allocate definition ==="
rg -n "^.*allocate\s*\(" src/fl/stl --type=hpp -B 2 -A 5 | head -40Repository: FastLED/FastLED
Length of output: 419
🏁 Script executed:
#!/bin/bash
# Read the make_shared implementation more carefully
echo "=== Reading lines 410-450 of shared_ptr.h where make_shared is defined ==="
sed -n '410,450p' src/fl/stl/shared_ptr.h
echo ""
echo "=== Looking for allocate function in shared_ptr.h ==="
grep -n "allocate" src/fl/stl/shared_ptr.h
echo ""
echo "=== Search for InlinedControlBlock definition ==="
sed -n '100,160p' src/fl/stl/shared_ptr.hRepository: FastLED/FastLED
Length of output: 4616
🏁 Script executed:
#!/bin/bash
# Find fl::aligned_alloc implementation
echo "=== Searching for aligned_alloc definition ==="
find src/fl/stl -type f -name "*.h" -o -name "*.cpp.hpp" | xargs grep -l "aligned_alloc" 2>/dev/null
echo ""
echo "=== Reading aligned_alloc implementation ==="
grep -n "aligned_alloc" src/fl/stl/*.h -A 5 | head -40
echo ""
echo "=== Checking cstdlib for memory allocation ==="
head -50 src/fl/stl/cstdlib.hRepository: FastLED/FastLED
Length of output: 3872
🏁 Script executed:
#!/bin/bash
# Find the actual implementation of aligned_alloc
echo "=== Reading cstdlib.cpp.hpp for aligned_alloc implementation ==="
grep -n "aligned_alloc" src/fl/stl/cstdlib.cpp.hpp -A 20 | head -60
echo ""
echo "=== Checking if aligned_alloc can return null or asserts ==="
cat src/fl/stl/cstdlib.cpp.hpp | grep -A 30 "void \*aligned_alloc"Repository: FastLED/FastLED
Length of output: 3227
🏁 Script executed:
#!/bin/bash
# Verify the critical issue: operator new can return null with -fno-exceptions
echo "=== Checking how standard C++ handles null from operator new with -fno-exceptions ==="
cat src/fl/stl/noexcept.h | head -30
echo ""
echo "=== Double-check: Does make_shared handle null from operator new? ==="
sed -n '414,420p' src/fl/stl/shared_ptr.h
echo ""
echo "=== Verify similar patterns in codebase are also unchecked ==="
grep -n "fl::make_shared" src/platforms/shared/bitbang/bus_traits.h -B 2 -A 3Repository: FastLED/FastLED
Length of output: 1491
Allocation failure handling is unsafe in no-exceptions environment.
The instance() method calls fl::make_shared without checking for allocation failure. With -fno-exceptions compilation (as enforced by the project), fl::aligned_alloc → malloc can return nullptr on failure. The make_shared implementation does not check for null and immediately dereferences the pointer (lines 416, 418, 419), causing a crash if memory allocation fails.
The same pattern exists throughout the codebase but violates the coding guideline: "use error codes or fl::optional instead" of try-catch blocks or exception handling.
Fix: Either use fl::optional<fl::shared_ptr<Driver>> and handle the null case in instance(), or add an abort/assertion in fl::aligned_alloc on allocation failure to make the no-check pattern explicit and safe.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/platforms/esp/32/drivers/uart/bus_traits.h` around lines 32 - 42, The
instance() singleton constructs Holder using fl::make_shared (via
UartPeripheralEsp and Driver) which assumes allocations never return nullptr;
under -fno-exceptions fl::aligned_alloc (and fl::make_shared) can return null
and will be dereferenced causing a crash. Fix by changing Holder to hold
fl::optional<fl::shared_ptr<UartPeripheralEsp>> and
fl::optional<fl::shared_ptr<Driver>> (or at least make driver optional), check
the optionals after attempting fl::make_shared in Holder's constructor and
handle allocation failure by returning a safe error path from instance() (e.g.,
return a null/optional result or call a controlled abort/assertion);
alternatively, if you prefer the other approach, make fl::aligned_alloc
explicitly abort/assert on allocation failure so the current no-check pattern is
explicit—apply the selected fix to the instance(), Holder, and analogous
singleton patterns that use fl::make_shared.
…3a of #2428) Adds a non-template polymorphic anchor `fl::IChannel` so ChannelEvents callbacks keep working after `Channel<Bus, Chipset>` becomes a template in Phase 3b. Pure API surface refactor -- no behavior changes. - New: src/fl/channels/ichannel.h. Minimal ABC with virtual `id()` and `name()`, noexcept special members, non-copyable/movable. Holds the public surface that any callback might reasonably want. - Channel now derives from CPixelLEDController<RGB> AND IChannel; existing `id()` / `name()` accessors marked `override`. - ChannelEvents callbacks change from `function_list<void(const Channel&, ...)>` to `function_list<void(const IChannel&, ...)>`. Callsites that fire events pass `*this` which upcasts implicitly via the new inheritance. - Test/doc lambdas migrated: tests/fastled_core.cpp EventTracker stores `const IChannel*`; lambdas in fastled_core.cpp, fl/channels/driver.cpp, fl/chipsets/ucs7604.cpp updated. README and FastLED.h docstrings refreshed. Also fixes pre-existing KBI checker failures in test.py (lines 186/193/211) flagged by lint -- the test-lock fix from #2432 introduced try-except blocks catching Exception without KeyboardInterrupt re-raise. Added the standard `except KeyboardInterrupt as ki: handle_keyboard_interrupt(ki)` clause before each `except Exception`. Per CodeRabbit feedback on PR #2435, the cleanup intentionally suppresses (does NOT re-raise) KeyboardInterrupt because: - _release_held_build_locks() is best-effort cleanup called by deadman_timer and watchdog_timer, both of which call os._exit() unconditionally afterward. - Re-raising would short-circuit the os._exit() and defeat the watchdog. Verification: - bash lint clean. - bash test --cpp passes (303/303). - ChannelEvents tests verified: pointer-identity comparisons `tracker.mLastChannel == channel.get()` still work because Channel inherits from IChannel (implicit upcast). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
da8e588 to
a84ac1b
Compare
Squashed and addressed CodeRabbit feedbackForce-pushed a single squashed commit replacing the prior 2-commit history. Addressed
The function now satisfies the KBI001 lint rule ( Skipped with rationale
Fixing this requires either:
Both are out of scope for a Phase 2/3a additive PR; the risk profile of my code is identical to the surrounding codebase. Worth a follow-up issue if not already tracked.
Verification after squash
|
…3a of #2428) Adds a non-template polymorphic anchor `fl::IChannel` so ChannelEvents callbacks keep working after `Channel<Bus, Chipset>` becomes a template in Phase 3b. Pure API surface refactor -- no behavior changes. - New: src/fl/channels/ichannel.h. Minimal ABC with virtual `id()` and `name()`, noexcept special members, non-copyable/movable. Holds the public surface that any callback might reasonably want. - Channel now derives from CPixelLEDController<RGB> AND IChannel; existing `id()` / `name()` accessors marked `override`. - ChannelEvents callbacks change from `function_list<void(const Channel&, ...)>` to `function_list<void(const IChannel&, ...)>`. Callsites that fire events pass `*this` which upcasts implicitly via the new inheritance. - Test/doc lambdas migrated: tests/fastled_core.cpp EventTracker stores `const IChannel*`; lambdas in fastled_core.cpp, fl/channels/driver.cpp, fl/chipsets/ucs7604.cpp updated. README and FastLED.h docstrings refreshed. Also fixes pre-existing KBI checker failures in test.py (lines 186/193/211) flagged by lint -- the test-lock fix from #2432 introduced try-except blocks catching Exception without KeyboardInterrupt re-raise. Added the standard `except KeyboardInterrupt as ki: handle_keyboard_interrupt(ki)` clause before each `except Exception`. Per CodeRabbit feedback on PR #2435, the cleanup intentionally suppresses (does NOT re-raise) KeyboardInterrupt because: - _release_held_build_locks() is best-effort cleanup called by deadman_timer and watchdog_timer, both of which call os._exit() unconditionally afterward. - Re-raising would short-circuit the os._exit() and defeat the watchdog. Verification: - bash lint clean. - bash test --cpp passes (303/303). - ChannelEvents tests verified: pointer-identity comparisons `tracker.mLastChannel == channel.get()` still work because Channel inherits from IChannel (implicit upcast). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
a84ac1b to
b0f49c8
Compare
|
@zackees teensy41 failure is pre-existing on master — same PROGMEM section type conflict ( Filed as follow-up PR per your instruction: #2436. The fix special-cases |
…bleAllDrivers + diagnostics) (#2458) The channels README hadn't been updated since #2435 (Phase 3a) while the real API surface grew through #2437/2438/2441/2448/2449/2450/2451/2454/ 2456. This refresh aligns the docs with what the code actually does today. Reviewed in three independent sub-agent passes: - Pass 1 (broad accuracy): added the new dual-mode dispatch architecture section (compile-time `fl::Bus` binding vs runtime `ChannelManager`), the templated `Channel::create<Bus B>(cfg)` / `FastLED.add<Bus B>(cfg)` examples, the `ChannelConfigOf<Chipset>` + `TypedChannel<Bus, Chipset>` Phase 3b API, the `enableDrivers<>()` / `enableAllDrivers()` opt-in registry, the `FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY` binary-size macro, the one-shot affinity-miss diagnostic (#2456), and the driver-name rename callout (BITBANG -> BIT_BANG, FLEXIO -> FLEX_IO, OBJECTFLED -> OBJECT_FLED). Updated the registration example to the current 2-arg `addDriver(priority, driver)` signature; the name comes from `driver->getName()`. Expanded the Reference section to list the new headers (`bus.h`, `bus_traits.h`, `all_drivers.h`, `channel_typed.h`, `ichannel.h`) and to include `findDriverByName` / `clearAllDrivers` on `manager.h`. - Pass 2 (independent verification): fixed two real bugs the first pass left in place. (a) DMA wait-pattern snippet referenced a nonexistent `EngineState::READY` — corrected to `IChannelDriver::DriverState::READY`. (b) "Overriding Engine Selection" examples called a nonexistent `FastLED.setDriverPriority(...)` — the method lives only on `ChannelManager::setDriverPriority`; rewrote both call sites to `fl::ChannelManager::instance().setDriverPriority(...)` with an explanatory comment about the API asymmetry vs the `setDriverEnabled` / `setExclusiveDriver` helpers that DO have CFastLED forwarders. - Pass 3 (polish): added missing file-scope `CRGB leds[60];` declarations to two example snippets that referenced `leds` without anchoring it. Inserted an "alternatives, not a sequence" clarifier above the three Override Methods so a careful reader doesn't think calling all three in order is intended. Verified the `Bus::AUTO` story end-to-end: `FastLED.add<fl::Bus::AUTO>(cfg)` never appears as an example (the static_assert from #2451 rejects it); only `FastLED.add(cfg)` (implicit default via `ChannelConfigOf`) and `FastLED.add(fl::Bus::AUTO, cfg)` (runtime form, clears affinity) are shown. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Summary by CodeRabbit
New Features
Refactor
Documentation
Tests
Bug Fixes