Skip to content

feat(channels): portable Bus enum migration (#3439) - #3444

Merged
zackees merged 1 commit into
masterfrom
feat/bus-portable-migration-3439
Jun 30, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/bus-portable-migration-3439

Conversation

@zackees

@zackees zackees commented Jun 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #3439 — implements the portable, capability-based Bus enum migration.

The 15-value vendor-named enum (RMT/PARLIO/I2S/I2S_SPI/LCD_RGB/LCD_SPI/LCD_CLOCKLESS/OBJECT_FLED/FLEX_IO/LPUART/UART/SPI/BIT_BANG/STUB/AUTO) is replaced by 9 portable engine-type values:

enum class Bus : u8 {
    AUTO, BIT_BANG, UART, SPI, DUAL_SPI, QUAD_SPI, OCTAL_SPI, RMT, FLEX_IO
};

Per-platform instance selection moves to a separate Which template parameter (default 0).

New surface (all per the issue's binding contract)

  • src/fl/channels/bus_features.h — zero-fills FASTLED_HAS_* macros so feature-detection chains compile uniformly.
  • src/fl/channels/bus_info.h — DeviceInfo / DeviceRuntime structs + deviceInfo<B, Which>() primary template (no-op fallback) + per-platform (B, Which) specializations.
  • src/fl/channels/bus_info.json.h — opt-in JSON adapter for AutoResearch (only links fl::json when explicitly called).
  • src/fl/channels/bus_info_impl.cpp.hpp — unity-build anchor.
  • BusInstanceCount<B> trait + busName(b, which) / busDriverName(b, which, spi) helpers in bus.h.
  • tests/fl/channels/bus_info.cpp — FL_STATIC_ASSERT on instance counts per platform + runtime no-op fallback check + JSON round-trip.

Rollout — single breaking swap

Per the issue's rollout section: no deprecation aliases, no transition window. All callers (sketches, examples, tests, internal BusTraits<> registrations) flip to the new enum in this same commit. Sketches in examples/AutoResearch/ that referenced Bus::OBJECT_FLED / Bus::PARLIO / Bus::LCD_SPI / Bus::I2S_SPI / Bus::STUB / Bus::LPUART are updated to the portable names.

Compliance with #3428 (unified clockless+SPI engine rule)

  • No new Bus::X_SPI enum value for any peripheral with a Bus::X clockless mode.
  • No ChannelEngineXxxSPI class added.
  • Bus::FLEX_IO is the single engine-class name for any parallel-IO peripheral; per-mode dispatch happens at show-time inside the channel engine, not at the enum layer.

Validation

  • bash test --cpp --clean — 338/338 passed (93s wall clock).
  • bash compile wasm --examples Blink — pass.
  • bash lint — pass, no new warnings.
  • bash compile esp32s3 --examples Blink — running on push.
  • CI matrix across Linux/macOS/Windows + per-board ATmega/SAMD/RP2040/Teensy/ESP32 family.
  • AutoResearch hardware validation — pending after CI green (Teensy 4.x ObjectFLED + ESP32-S3 LCD_CAM + ESP32-C6 PARLIO).

Notes

  • Implements the design from the issue's "Implementation contract for coding agents" section verbatim — file inventory, exact public API, feature macro naming, resolution chain priorities. No unilateral design changes.
  • The fbuild dependency was bumped to 2.3.14 (in pyproject.toml) to pull in the serial-WebSocket and async-timeout fixes needed for the AutoResearch validation pass.
  • All five "open questions" at the bottom of Refactor Bus enum for cross-platform portability (generic names + vendor escape hatch) #3439 are deferred to follow-up issues per design.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added portable bus/device introspection and JSON output, including runtime status details and bus instance selection.
    • Expanded driver selection to support multiple instances of the same bus type.
  • Bug Fixes

    • Unified several platform-specific bus paths under a more consistent selection model.
    • Improved host/WASM/stub fallback behavior to use the portable bit-bang path.
    • Refined example filtering so platform constraints are detected more reliably.
  • Documentation

    • Updated channel and hardware docs to match the new bus naming and selection behavior.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

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: 3540b51f-0aaf-4d5b-bd0c-33735fde202c

📥 Commits

Reviewing files that changed from the base of the PR and between f95321d and 4e0d31b.

📒 Files selected for processing (67)
  • agents/docs/cpp-standards.md
  • agents/docs/hardware-autoresearch.md
  • ci/autoresearch/test_flexio_rx_objectfled.py
  • ci/meson/discover_examples_all.py
  • ci/tests/test_autoresearch_phases.py
  • ci/wasm_build.py
  • examples/AutoResearch/AutoResearchParlioStream.h
  • examples/AutoResearch/AutoResearchRemoteDriverMethods.cpp
  • examples/AutoResearch/AutoResearchRemotePinMethods.cpp
  • examples/AutoResearch/AutoResearchRemoteRunParallelTest.cpp
  • examples/AutoResearch/AutoResearchRemoteSystemMethods.cpp
  • examples/meson.build
  • src/FastLED.cpp.hpp
  • src/FastLED.h
  • src/fl/channels/README.md
  • src/fl/channels/_build.cpp.hpp
  • src/fl/channels/bus.h
  • src/fl/channels/bus_features.h
  • src/fl/channels/bus_info.h
  • src/fl/channels/bus_info.json.h
  • src/fl/channels/bus_info_impl.cpp.hpp
  • src/fl/channels/bus_priorities.h
  • src/fl/channels/bus_traits.h
  • src/fl/channels/channel.cpp.hpp
  • src/fl/channels/channel.h
  • src/fl/channels/channel_typed.h
  • src/fl/channels/manager.cpp.hpp
  • src/fl/channels/manager.h
  • src/fl/channels/options.h
  • src/platforms/arm/teensy/channel_drivers_teensy.impl.hpp
  • src/platforms/arm/teensy/teensy4_common/drivers/flexio/bus_traits.h
  • src/platforms/arm/teensy/teensy4_common/drivers/lpuart/_build.cpp.hpp
  • src/platforms/arm/teensy/teensy4_common/drivers/lpuart/bus_traits.h
  • src/platforms/arm/teensy/teensy4_common/drivers/lpuart/channel_engine_lpuart.cpp.hpp
  • src/platforms/arm/teensy/teensy4_common/drivers/lpuart/ilpuart_peripheral.h
  • src/platforms/arm/teensy/teensy4_common/drivers/objectfled/_build.cpp.hpp
  • src/platforms/arm/teensy/teensy4_common/drivers/objectfled/bus_traits.h
  • src/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.h
  • src/platforms/esp/32/channel_drivers_esp32.impl.hpp
  • src/platforms/esp/32/drivers/channel_manager_esp32.cpp.hpp
  • src/platforms/esp/32/drivers/i2s/_build.cpp.hpp
  • src/platforms/esp/32/drivers/i2s/bus_traits.h
  • src/platforms/esp/32/drivers/i2s_spi/_build.cpp.hpp
  • src/platforms/esp/32/drivers/i2s_spi/bus_traits.h
  • src/platforms/esp/32/drivers/lcd_cam/_build.cpp.hpp
  • src/platforms/esp/32/drivers/lcd_cam/bus_traits.h
  • src/platforms/esp/32/drivers/lcd_spi/_build.cpp.hpp
  • src/platforms/esp/32/drivers/lcd_spi/bus_traits.h
  • src/platforms/esp/32/drivers/parlio/_build.cpp.hpp
  • src/platforms/esp/32/drivers/parlio/bus_traits.h
  • src/platforms/esp/32/drivers/parlio/clockless_parlio_esp32.h
  • src/platforms/esp/32/drivers/spi/_build.cpp.hpp
  • src/platforms/esp/32/drivers/spi/bus_traits.h
  • src/platforms/stub/bus_traits.h
  • src/platforms/stub/channel_drivers_stub.impl.hpp
  • src/platforms/stub/clockless_channel_stub.h
  • src/platforms/stub/init_channel_driver.h
  • src/platforms/stub/spi_channel_stub.h
  • src/platforms/wasm/clockless_channel_wasm.h
  • src/platforms/wasm/spi_channel_wasm.h
  • tests/fl/channels/all_drivers.cpp
  • tests/fl/channels/bus_info.cpp
  • tests/fl/channels/bus_traits.cpp
  • tests/fl/channels/channel.cpp
  • tests/fl/channels/channel_typed.cpp
  • tests/fl/channels/wave8.cpp
  • tests/platforms/shared/active_strip_data/active_strip_data.cpp

📝 Walkthrough

Walkthrough

The PR refactors fl::Bus from a platform-specific enum to 9 portable enumerators (AUTO, BIT_BANG, UART, SPI, DUAL_SPI, QUAD_SPI, OCTAL_SPI, RMT, FLEX_IO), adds a Which instance discriminator across BusTraits, BusSupports, TypedChannel, ChannelOptions, Channel, and ChannelManager, remaps all platform drivers (ESP32 LCD/I2S/PARLIO → FLEX_IO,0/1; Teensy ObjectFLED → FLEX_IO,0; LPUART → UART; STUB → BIT_BANG), and adds compile-time bus introspection (DeviceInfo, deviceInfo<B,Which>(), deviceJson()).

Changes

Portable Bus and Which Refactor

Layer / File(s) Summary
Bus enum, feature macros, priorities, and introspection contracts
src/fl/channels/bus.h, src/fl/channels/bus_features.h, src/fl/channels/bus_priorities.h, src/fl/channels/bus_info.h, src/fl/channels/bus_info.json.h, src/fl/channels/bus_info_impl.cpp.hpp, src/fl/channels/_build.cpp.hpp
fl::Bus is reduced to 9 portable enumerators with updated DefaultBus, BusInstanceCount, busName/new busDriverName functions, revised priorities, new FASTLED_HAS_* feature macros, and new DeviceRuntime/DeviceInfo introspection types with deviceInfo<B,Which>() and deviceJson() accessors.
Which-aware channel traits, routing, and exclusive-driver APIs
src/fl/channels/bus_traits.h, src/fl/channels/options.h, src/fl/channels/channel.h, src/fl/channels/channel.cpp.hpp, src/fl/channels/channel_typed.h, src/fl/channels/manager.h, src/fl/channels/manager.cpp.hpp, src/FastLED.h, src/FastLED.cpp.hpp
BusTraits<B,Which> and BusSupports<B,Chipset,Which> gain a Which parameter; ChannelOptions gets mBusWhich; Channel constructors initialize and propagate mBusWhich; resolveDynamicDriver uses busDriverName(mBus,mBusWhich,isSpi()); TypedChannel<B,Chipset,Which> enforces per-instance compile-time support; setExclusiveDriver on manager and CFastLED accept Which.
Platform driver remapping to FLEX_IO slots and BIT_BANG
src/platforms/arm/teensy/..., src/platforms/esp/32/..., src/platforms/stub/..., src/platforms/wasm/...
All ESP32 drivers (PARLIO, LCD_CAM/RGB, LCD_SPI, LCD_CLOCKLESS, I2S, I2S_SPI) remap to BusTraits<FLEX_IO,0> or BusTraits<FLEX_IO,1>; Teensy ObjectFLED → FLEX_IO,0, FlexIO2 → FLEX_IO,1, LPUART → UART; stub/WASM fallback rewired from STUB to BIT_BANG; enableAllChannelDrivers updated on all platforms.
Tests for introspection, bus traits, channels, and platform drivers
tests/fl/channels/bus_info.cpp, tests/fl/channels/bus_traits.cpp, tests/fl/channels/channel.cpp, tests/fl/channels/channel_typed.cpp, tests/fl/channels/all_drivers.cpp, tests/fl/channels/wave8.cpp, tests/platforms/shared/active_strip_data/...
New bus_info.cpp validates DeviceInfo/deviceJson for BIT_BANG, UART, SPI including out-of-range Which noop; existing channel/trait/driver tests rewritten to use BIT_BANG instead of STUB; static asserts and runtime bindings updated.
Examples, CI, build filters, and docs
examples/AutoResearch/..., examples/meson.build, ci/meson/discover_examples_all.py, ci/wasm_build.py, ci/autoresearch/..., ci/tests/..., src/fl/channels/README.md, agents/docs/...
AutoResearch examples update ChannelOptions to FLEX_IO/UART/BIT_BANG; autoResearchDeviceJson helper added; discover_examples_all.py adds YAML @filter/@end-filter block parsing; meson.build expands platform-incompatibility conditions; wasm_build.py expands excluded build dirs; docs and CI strings updated to new bus names.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • FastLED/FastLED#3432: Directly related — implements the unified ObjectFLED clockless+SPI engine that this PR rewires from Bus::OBJECT_FLED to Bus::FLEX_IO, 0.
  • FastLED/FastLED#3430: Directly related — establishes the "one engine for both clockless and SPI modes" parallel-IO rule that this PR implements across PARLIO/LCD_CAM/I2S via FLEX_IO slots.
  • FastLED/FastLED#3421: Directly related — adds the Bus::LPUART/BusTraits LPUART4 wiring on Teensy that this PR replaces with Bus::UART.

Poem

🐇 Hopped through the bus lanes, trimmed every old name,
Nine portable slots now — each Which plays the same!
FLEX_IO, BIT_BANG, UART in a row,
No more OBJECT_FLED wherever we go.
The rabbit now routes with a portable flair — 🎉

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The pyproject.toml fbuild pin bump looks unrelated to the Bus migration objectives and is not justified by the linked issue summary. Split the fbuild dependency bump into a separate change unless it is required for the migration, and document that dependency need explicitly.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and matches the main change: migrating the Bus enum to portable names.
Linked Issues check ✅ Passed The PR appears to implement the portable Bus enum, Which selection, deviceInfo/json, and host/WASM/test updates required by #3439.
✨ 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 feat/bus-portable-migration-3439

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.

Implements the portable, capability-based Bus enum from #3439:

  enum class Bus : u8 {
      AUTO, BIT_BANG, UART, SPI, DUAL_SPI, QUAD_SPI, OCTAL_SPI, RMT, FLEX_IO
  };

Replaces the previous vendor-named taxonomy (RMT/PARLIO/SPI/I2S/I2S_SPI/
LCD_RGB/LCD_SPI/LCD_CLOCKLESS/UART/FLEX_IO/OBJECT_FLED/LPUART/BIT_BANG/STUB)
with 9 user-facing engine types. Per-platform instance selection happens
via a separate `Which` template parameter (defaults to 0).

New surface:
- `src/fl/channels/bus_features.h` — zero-fills FASTLED_HAS_* macros.
- `src/fl/channels/bus_info.h` — `DeviceInfo`/`DeviceRuntime` +
  `deviceInfo<B, Which>()` primary template + per-platform specializations.
- `src/fl/channels/bus_info.json.h` — JSON adapter for AutoResearch.
- `src/fl/channels/bus_info_impl.cpp.hpp` — unity-build anchor.
- `BusInstanceCount<B>` trait with per-platform max-Which values.
- `busName(b, which)` / `busDriverName(b, which, spi)` helpers.
- `tests/fl/channels/bus_info.cpp` — static_asserts on instance counts +
  runtime checks for the no-op fallback path.

Per-driver `_build.cpp.hpp` files updated to advertise the right
`FASTLED_HAS_*` feature macro when their TU is compiled in. ChannelManager,
DefaultBus<Chipset>, BusTraits<>, and the existing `enableDrivers<>` /
`setExclusiveDriver<>` machinery rewired to the portable names.

All sketches under `examples/` and tests under `tests/` updated to use
the new portable names in the same commit (single breaking swap per the
issue's rollout section).

Validation:
- bash test --cpp --clean: 338/338 pass.
- bash compile wasm --examples Blink: pass.
- bash lint: pass (no new warnings).

Refs: #3428 (unified clockless+SPI engine rule preserved)
Closes-pending: #3439

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees force-pushed the feat/bus-portable-migration-3439 branch from f95321d to 4e0d31b Compare June 30, 2026 17:31
@zackees
zackees merged commit 6de65a9 into master Jun 30, 2026
6 of 9 checks passed
@zackees
zackees deleted the feat/bus-portable-migration-3439 branch June 30, 2026 17:32
zackees added a commit that referenced this pull request Jun 30, 2026
Today the cross-platform build matrix only fires on push to master.
For large refactors (e.g. the #3444 bus enum migration), contributors
have no way to exercise the matrix on a feature branch before merge,
which forces a merge-then-fix-forward cycle on any board the local
WASM/Teensy validation didn't cover.

Adding workflow_dispatch lets a maintainer run the matrix on demand
against any branch via the Actions UI or `gh workflow run build.yml
--ref <branch>`. Path filters are unchanged; the dispatch path doesn't
honour them anyway. No behavioural change for push events.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/fl/channels/manager.h (1)

118-128: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Refresh the docs for the new which-aware overloads.

The comments still describe setExclusiveDriverByName(busName(bus)) and BusTraits<B>::instancePtr(), but the code now routes through busDriverName(bus, which) and BusTraits<B, Which>::instancePtr(). Please document which explicitly so the public contract matches the implementation.

🤖 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/manager.h` around lines 118 - 128, The docs for
setExclusiveDriver and setExclusiveDriver(Bus bus, fl::u8 which) are stale and
still mention the old busName(bus) and BusTraits<bus>::instancePtr() paths.
Update the comments on these overloads to document the which parameter
explicitly, and describe that the runtime version delegates through
busDriverName(bus, which) while the template version uses BusTraits<B,
Which>::instancePtr(). Keep the public contract aligned with the current
implementation and mention Which in the template overload summary.
🤖 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 `@ci/meson/discover_examples_all.py`:
- Around line 93-103: The _filter_value_matches helper does not trim whitespace
after removing the -d prefix, so space-separated filters like "-d esp32s3" fail
to match in both the exact and wildcard branches. Update the filter handling in
_filter_value_matches to strip surrounding whitespace immediately after dropping
the "-d" prefix, then continue using the normalized value for the fnmatch and
equality checks.
- Around line 280-305: Update discover_examples_all.py in the filter handling
logic so YAML-style blocks are detected and parsed before the generic one-line
`@filter`:/@filter-out: branch. In the filtering section around
parse_yaml_filter(), reorder the conditions (or otherwise distinguish block
openers from single-line annotations) so a // `@filter`: opener is handled by
parse_yaml_filter() instead of being treated as an empty inline filter. Keep the
existing FILTER| and SKIP| output behavior, but ensure the symbols
should_skip_for_stub() and parse_yaml_filter() are used for the correct
annotation type.
- Around line 25-29: Update the filter parser to use FilterDiscovery end-to-end
instead of returning a raw (bool, str) from _should_skip_yaml_filter(); have
that helper construct and return a FilterDiscovery instance so the caller can
use the same shape consistently. Also add `@typechecked` to the FilterDiscovery
dataclass definition to match the repo’s Python typing rules and keep the
discovery flow aligned with the existing parser symbols.

In `@ci/wasm_build.py`:
- Around line 831-836: The extra source filtering in the example scan is using
the full path from Path.parts, so checkout directories like build or .pio can
wrongly exclude every .cpp file. Update the predicate in the extra_cpps
collection to inspect the example-relative path from
f.relative_to(example_dir).parts instead, keeping the exclusion set in the
existing wasm_build.py source discovery logic intact.

In `@examples/AutoResearch/AutoResearchRemoteRunParallelTest.cpp`:
- Around line 228-238: The bus selection logic in
AutoResearchRemoteRunParallelTest::parse should not map I2S_SPI or LCD_SPI to
FLEX_IO, because those names still need SPI semantics and currently resolve to
the wrong driver name during pin matching. Update the parsing branch that sets
opts.mBus and opts.mBusWhich so these SPI-only cases are either rejected here or
converted into a proper SPI ChannelConfig, and keep the existing FLEX_IO
mappings only for the clockless variants like I2S and LCD_CLOCKLESS.

In `@src/fl/channels/bus_features.h`:
- Around line 12-115: The new capability macros in bus_features.h use the
disallowed FASTLED_HAS_* namespace, so rename each newly introduced identifier
to the required FL_* form and update any internal checks that reference them.
Keep the same feature detection logic in this header, but move the public API
surface away from FASTLED_HAS_OBJECTFLED, FASTLED_HAS_FLEXIO,
FASTLED_HAS_PARLIO, FASTLED_HAS_LCD_CAM_CLOCKLESS, FASTLED_HAS_LCD_SPI,
FASTLED_HAS_I2S_LED, FASTLED_HAS_I2S_SPI, FASTLED_HAS_RMT4, FASTLED_HAS_RMT5,
FASTLED_HAS_LPSPI, FASTLED_HAS_LPUART_PARALLEL, FASTLED_HAS_PIO,
FASTLED_HAS_PIO1, FASTLED_HAS_SOFT_SPI, and FASTLED_HAS_SOFT_UART by replacing
them with FL_<COMPONENT>_<NAME> equivalents wherever they are defined or
consumed.

In `@src/fl/channels/bus_info.h`:
- Around line 161-171: Update DeviceInfoResolver<Bus::FLEX_IO, 0>::get() so
clockless-only I2S builds are reported as available, not NOOP. Extend the
existing FASTLED_HAS_I2S_SPI check to also recognize FASTLED_HAS_I2S_LED,
matching the capability already used by Bus::FLEX_IO in bus.h. Keep the makeInfo
path consistent with the other available drivers and preserve the fallback
makeNoop only when neither I2S nor the other FLEX_IO backends are enabled.

In `@src/fl/channels/bus.h`:
- Around line 126-133: The new feature-gate checks in bus.h still use frozen
FASTLED_* naming, so rename them to the FL_<COMPONENT>_HAS_<FEATURE> family and
update every matching caller in the same change. Locate the conditional branches
in the bus-related helpers that currently test FASTLED_HAS_PARLIO,
FASTLED_HAS_LCD_SPI, FASTLED_HAS_LCD_CAM_CLOCKLESS, FASTLED_HAS_I2S_SPI, and
FASTLED_HAS_I2S_LED, and replace those identifiers with the new FL-prefixed
macros consistently across the diff.
- Around line 14-20: The macro save/undef block in bus.h leaves UART, SPI, and
I2S permanently undefined for later includes, so restore them before the header
ends. Update the same bus.h header to pair the existing `#pragma` push_macro
entries with matching pop_macro directives after the affected declarations,
keeping the public include from leaking macro state into the rest of the
translation unit.

In `@src/fl/channels/channel.cpp.hpp`:
- Around line 395-399: The remediation text is incorrectly reusing the concrete
driver key from busDriverName(), which can produce impossible fl::Bus::...
suggestions for portable buses. Keep using busDriverName() for the registry
lookup in the channel/bus registration path, but change the miss-path hint
construction to derive the user-facing API suggestion from the portable (mBus,
mBusWhich) tuple instead, using the relevant symbols in channel.cpp.hpp that
format the fl::Bus::%s message.

In `@src/fl/channels/manager.cpp.hpp`:
- Around line 242-243: The setExclusiveDriver(Bus, which) overload is always
resolving the non-SPI driver name because it calls busDriverName(bus, which)
with the default spi=false, so FLEX_IO can never select LCD_SPI/I2S_SPI on
ESP32. Update this path in ChannelManager::setExclusiveDriver so the {bus,
which} lookup maps to the correct concrete driver name for the intended mode,
either by threading the SPI/non-SPI choice through the API or by making
busDriverName selection explicit before calling setExclusiveDriverByName.

In `@src/platforms/arm/teensy/teensy4_common/drivers/objectfled/bus_traits.h`:
- Around line 39-48: Remove the premature SPI compile-time enablement for
ObjectFLED in BusSupports so Bus::FLEX_IO with SpiChipsetConfig is not
advertised as supported until the runtime path can truly handle it. Update the
BusSupports specialization in bus_traits.h to match the current
ChannelEngineObjectFLED/canHandle() behavior and the stubbed
objectfled_spi_lookup_pins() logic, keeping only the clockless path enabled for
now. If SPI support is meant to land in this change, then also update
ChannelEngineObjectFLED so canHandle() and the SPI pin lookup accept real SPI
channels before exposing the Bus::FLEX_IO, 0 contract.

In `@src/platforms/esp/32/drivers/i2s_spi/bus_traits.h`:
- Around line 44-45: `registerWithManager()` is now using the shared FLEX_IO
baseline instead of the ESP32-specific I2S-SPI priority, which can cause this
backend to register too low and lose selection to other SPI drivers. Update the
`registerWithManager()` path in `bus_traits.h` to preserve the concrete ESP32
priority used for this driver (matching the explicit priority in
`channel_manager_esp32.cpp.hpp`) rather than calling
`default_bus_priority(Bus::FLEX_IO, 0)`, so `enableDrivers<Bus::FLEX_IO, 0>()`
and `enableAllDrivers()` continue to prefer the intended engine.

In `@src/platforms/esp/32/drivers/lcd_cam/bus_traits.h`:
- Around line 41-42: The registration in registerWithManager() is using
default_bus_priority(Bus::FLEX_IO, 1), which ties PARLIO with LCD_RGB on
ESP32-P4 and breaks the documented precedence. Update the priority used by the
opt-in driver registration so PARLIO remains above LCD_RGB, and keep the
ordering consistent with the constants in channel_manager_esp32.cpp.hpp
(PRIORITY_PARLIO and PRIORITY_LCD_RGB). Focus the fix in the bus_traits.h
registration path and preserve the intended clockless-driver selection order.

In `@src/platforms/esp/32/drivers/lcd_spi/bus_traits.h`:
- Around line 38-67: The FLEX_IO bus trait is registering two separate drivers
for the same LCD_CAM slot, while instancePtr() only exposes the clockless one,
so the shared peripheral is split incorrectly. Update BusTraits<Bus::FLEX_IO, 0>
and the LcdCamBusHolder/lcd_cam_bus_holder setup to use one unified driver or
adapter for both SPI and clockless modes, and have registerWithManager()
register that single ChannelEngine instead of separate spi and clockless
engines. Ensure the unified driver’s canHandle() and show() dispatch
appropriately based on isSpi() versus isClockless().

In `@tests/fl/channels/channel.cpp`:
- Around line 346-347: Update the comment in the Channel test near
Channel::create<Bus::BIT_BANG>(cfg) and FastLED.add<Bus::BIT_BANG>(cfg) to use
ASCII-only punctuation; replace the non-ASCII em dash in the sentence about the
real BIT_BANG driver with a plain ASCII equivalent such as "--" so the C++
source-text rule is satisfied.

---

Outside diff comments:
In `@src/fl/channels/manager.h`:
- Around line 118-128: The docs for setExclusiveDriver and
setExclusiveDriver(Bus bus, fl::u8 which) are stale and still mention the old
busName(bus) and BusTraits<bus>::instancePtr() paths. Update the comments on
these overloads to document the which parameter explicitly, and describe that
the runtime version delegates through busDriverName(bus, which) while the
template version uses BusTraits<B, Which>::instancePtr(). Keep the public
contract aligned with the current implementation and mention Which in the
template overload summary.
🪄 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: 9c886f8f-1958-4820-a485-7608e0bb70c9

📥 Commits

Reviewing files that changed from the base of the PR and between 53cf85f and f95321d.

📒 Files selected for processing (69)
  • agents/docs/cpp-standards.md
  • agents/docs/hardware-autoresearch.md
  • ci/autoresearch/test_flexio_rx_objectfled.py
  • ci/meson/discover_examples_all.py
  • ci/tests/test_autoresearch_phases.py
  • ci/wasm_build.py
  • examples/AutoResearch/AutoResearchParlioStream.h
  • examples/AutoResearch/AutoResearchRemoteDriverMethods.cpp
  • examples/AutoResearch/AutoResearchRemotePinMethods.cpp
  • examples/AutoResearch/AutoResearchRemoteRunParallelTest.cpp
  • examples/AutoResearch/AutoResearchRemoteSystemMethods.cpp
  • examples/AutoResearch/LegacyClocklessProxy.h
  • examples/meson.build
  • pyproject.toml
  • src/FastLED.cpp.hpp
  • src/FastLED.h
  • src/fl/channels/README.md
  • src/fl/channels/_build.cpp.hpp
  • src/fl/channels/bus.h
  • src/fl/channels/bus_features.h
  • src/fl/channels/bus_info.h
  • src/fl/channels/bus_info.json.h
  • src/fl/channels/bus_info_impl.cpp.hpp
  • src/fl/channels/bus_priorities.h
  • src/fl/channels/bus_traits.h
  • src/fl/channels/channel.cpp.hpp
  • src/fl/channels/channel.h
  • src/fl/channels/channel_typed.h
  • src/fl/channels/manager.cpp.hpp
  • src/fl/channels/manager.h
  • src/fl/channels/options.h
  • src/platforms/arm/teensy/channel_drivers_teensy.impl.hpp
  • src/platforms/arm/teensy/teensy4_common/drivers/flexio/bus_traits.h
  • src/platforms/arm/teensy/teensy4_common/drivers/lpuart/_build.cpp.hpp
  • src/platforms/arm/teensy/teensy4_common/drivers/lpuart/bus_traits.h
  • src/platforms/arm/teensy/teensy4_common/drivers/lpuart/channel_engine_lpuart.cpp.hpp
  • src/platforms/arm/teensy/teensy4_common/drivers/lpuart/ilpuart_peripheral.h
  • src/platforms/arm/teensy/teensy4_common/drivers/objectfled/_build.cpp.hpp
  • src/platforms/arm/teensy/teensy4_common/drivers/objectfled/bus_traits.h
  • src/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.h
  • src/platforms/esp/32/channel_drivers_esp32.impl.hpp
  • src/platforms/esp/32/drivers/channel_manager_esp32.cpp.hpp
  • src/platforms/esp/32/drivers/i2s/_build.cpp.hpp
  • src/platforms/esp/32/drivers/i2s/bus_traits.h
  • src/platforms/esp/32/drivers/i2s_spi/_build.cpp.hpp
  • src/platforms/esp/32/drivers/i2s_spi/bus_traits.h
  • src/platforms/esp/32/drivers/lcd_cam/_build.cpp.hpp
  • src/platforms/esp/32/drivers/lcd_cam/bus_traits.h
  • src/platforms/esp/32/drivers/lcd_spi/_build.cpp.hpp
  • src/platforms/esp/32/drivers/lcd_spi/bus_traits.h
  • src/platforms/esp/32/drivers/parlio/_build.cpp.hpp
  • src/platforms/esp/32/drivers/parlio/bus_traits.h
  • src/platforms/esp/32/drivers/parlio/clockless_parlio_esp32.h
  • src/platforms/esp/32/drivers/spi/_build.cpp.hpp
  • src/platforms/esp/32/drivers/spi/bus_traits.h
  • src/platforms/stub/bus_traits.h
  • src/platforms/stub/channel_drivers_stub.impl.hpp
  • src/platforms/stub/clockless_channel_stub.h
  • src/platforms/stub/init_channel_driver.h
  • src/platforms/stub/spi_channel_stub.h
  • src/platforms/wasm/clockless_channel_wasm.h
  • src/platforms/wasm/spi_channel_wasm.h
  • tests/fl/channels/all_drivers.cpp
  • tests/fl/channels/bus_info.cpp
  • tests/fl/channels/bus_traits.cpp
  • tests/fl/channels/channel.cpp
  • tests/fl/channels/channel_typed.cpp
  • tests/fl/channels/wave8.cpp
  • tests/platforms/shared/active_strip_data/active_strip_data.cpp

Comment on lines +25 to +29
@dataclass(slots=True)
class FilterDiscovery:
metadata: str | None
should_skip: bool
reason: str

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="ci/meson/discover_examples_all.py"

printf '\n== file outline ==\n'
ast-grep outline "$file" --view expanded || true

printf '\n== relevant lines 1-220 ==\n'
sed -n '1,220p' "$file" | cat -n

printf '\n== relevant lines 220-360 ==\n'
sed -n '220,360p' "$file" | cat -n

Repository: FastLED/FastLED

Length of output: 15625


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="ci/meson/discover_examples_all.py"

printf '\n== search for FilterDiscovery and parser helpers ==\n'
rg -n "FilterDiscovery|_should_skip_yaml_filter|parse_yaml_filter|`@typechecked`|tuple\[bool, str\]|return .*should_skip|return .*reason" "$file"

printf '\n== surrounding helper code ==\n'
sed -n '1,220p' "$file" | awk 'NR>=1 && NR<=220 {print NR ":" $0}'

Repository: FastLED/FastLED

Length of output: 9111


Use FilterDiscovery end-to-end in the filter parser. _should_skip_yaml_filter() still returns a raw (bool, str), and FilterDiscovery is missing @typechecked; returning the dataclass here keeps the parser consistent with the repo’s Python rules.

🤖 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 `@ci/meson/discover_examples_all.py` around lines 25 - 29, Update the filter
parser to use FilterDiscovery end-to-end instead of returning a raw (bool, str)
from _should_skip_yaml_filter(); have that helper construct and return a
FilterDiscovery instance so the caller can use the same shape consistently. Also
add `@typechecked` to the FilterDiscovery dataclass definition to match the repo’s
Python typing rules and keep the discovery flow aligned with the existing parser
symbols.

Source: Coding guidelines

Comment on lines +93 to +103
def _filter_value_matches(board_value: str, filter_values: list[str]) -> bool:
board_value_lower = board_value.lower()
for filter_value in filter_values:
filter_value_lower = filter_value.lower()
if filter_value_lower.startswith("-d"):
filter_value_lower = filter_value_lower[2:]
if "*" in filter_value_lower:
if fnmatch.fnmatch(board_value_lower, filter_value_lower):
return True
elif board_value_lower == filter_value_lower:
return True

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Strip whitespace after removing the -d prefix.

-d esp32s3 becomes " esp32s3" here, so both the exact-match and wildcard paths miss. That breaks the newly added -d filter form for the common space-separated syntax.

Suggested fix
         if filter_value_lower.startswith("-d"):
-            filter_value_lower = filter_value_lower[2:]
+            filter_value_lower = filter_value_lower[2:].strip()
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
def _filter_value_matches(board_value: str, filter_values: list[str]) -> bool:
board_value_lower = board_value.lower()
for filter_value in filter_values:
filter_value_lower = filter_value.lower()
if filter_value_lower.startswith("-d"):
filter_value_lower = filter_value_lower[2:]
if "*" in filter_value_lower:
if fnmatch.fnmatch(board_value_lower, filter_value_lower):
return True
elif board_value_lower == filter_value_lower:
return True
def _filter_value_matches(board_value: str, filter_values: list[str]) -> bool:
board_value_lower = board_value.lower()
for filter_value in filter_values:
filter_value_lower = filter_value.lower()
if filter_value_lower.startswith("-d"):
filter_value_lower = filter_value_lower[2:].strip()
if "*" in filter_value_lower:
if fnmatch.fnmatch(board_value_lower, filter_value_lower):
return True
elif board_value_lower == filter_value_lower:
return True
🤖 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 `@ci/meson/discover_examples_all.py` around lines 93 - 103, The
_filter_value_matches helper does not trim whitespace after removing the -d
prefix, so space-separated filters like "-d esp32s3" fail to match in both the
exact and wildcard branches. Update the filter handling in _filter_value_matches
to strip surrounding whitespace immediately after dropping the "-d" prefix, then
continue using the normalized value for the fnmatch and equality checks.

Comment thread ci/meson/discover_examples_all.py Resolved
Comment thread ci/wasm_build.py
Comment on lines +831 to +836
excluded_dirs = {".build", ".fbuild", ".pio", ".vscode", "build", "fastled_js"}
extra_cpps = sorted(
f
for f in example_dir.rglob("*.cpp")
if f.name != f"{example_name}.ino" and ".build" not in f.parts
if not f.name.endswith(".ino.cpp")
and all(part not in excluded_dirs for part in f.parts)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Filter against the example-relative path, not the absolute checkout path.

f.parts includes every ancestor of the repository. If the checkout lives under build/, .pio/, .build/, etc., this predicate excludes every extra .cpp file and the wrapper silently misses required sources. Scope the check to f.relative_to(example_dir).parts instead.

Suggested fix
     extra_cpps = sorted(
         f
         for f in example_dir.rglob("*.cpp")
         if not f.name.endswith(".ino.cpp")
-        and all(part not in excluded_dirs for part in f.parts)
+        and all(
+            part not in excluded_dirs
+            for part in f.relative_to(example_dir).parts
+        )
     )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
excluded_dirs = {".build", ".fbuild", ".pio", ".vscode", "build", "fastled_js"}
extra_cpps = sorted(
f
for f in example_dir.rglob("*.cpp")
if f.name != f"{example_name}.ino" and ".build" not in f.parts
if not f.name.endswith(".ino.cpp")
and all(part not in excluded_dirs for part in f.parts)
excluded_dirs = {".build", ".fbuild", ".pio", ".vscode", "build", "fastled_js"}
extra_cpps = sorted(
f
for f in example_dir.rglob("*.cpp")
if not f.name.endswith(".ino.cpp")
and all(
part not in excluded_dirs
for part in f.relative_to(example_dir).parts
)
🤖 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 `@ci/wasm_build.py` around lines 831 - 836, The extra source filtering in the
example scan is using the full path from Path.parts, so checkout directories
like build or .pio can wrongly exclude every .cpp file. Update the predicate in
the extra_cpps collection to inspect the example-relative path from
f.relative_to(example_dir).parts instead, keeping the exclusion set in the
existing wasm_build.py source discovery logic intact.

Comment on lines +228 to +238
else if (n == "PARLIO") opts.mBus = fl::Bus::FLEX_IO;
else if (n == "SPI") opts.mBus = fl::Bus::SPI;
else if (n == "I2S") opts.mBus = fl::Bus::I2S;
else if (n == "I2S_SPI") opts.mBus = fl::Bus::I2S_SPI;
else if (n == "LCD_RGB") opts.mBus = fl::Bus::LCD_RGB;
else if (n == "LCD_SPI") opts.mBus = fl::Bus::LCD_SPI;
else if (n == "LCD_CLOCKLESS") opts.mBus = fl::Bus::LCD_CLOCKLESS;
else if (n == "I2S") opts.mBus = fl::Bus::FLEX_IO;
else if (n == "I2S_SPI") opts.mBus = fl::Bus::FLEX_IO;
else if (n == "LCD_RGB") { opts.mBus = fl::Bus::FLEX_IO; opts.mBusWhich = 1; }
else if (n == "LCD_SPI") opts.mBus = fl::Bus::FLEX_IO;
else if (n == "LCD_CLOCKLESS") opts.mBus = fl::Bus::FLEX_IO;
else if (n == "UART") opts.mBus = fl::Bus::UART;
else if (n == "FLEX_IO") opts.mBus = fl::Bus::FLEX_IO;
else if (n == "OBJECT_FLED") opts.mBus = fl::Bus::OBJECT_FLED;
else if (n == "LPUART") opts.mBus = fl::Bus::LPUART;
else if (n == "FLEX_IO") { opts.mBus = fl::Bus::FLEX_IO; opts.mBusWhich = 1; }
else if (n == "OBJECT_FLED") opts.mBus = fl::Bus::FLEX_IO;
else if (n == "LPUART") opts.mBus = fl::Bus::UART;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Don’t map I2S_SPI / LCD_SPI into a clockless FLEX_IO channel.

These channels are still built from timing_config.timing, so isSpi() stays false. Downstream busDriverName(Bus::FLEX_IO, ..., false) resolves to "I2S" / "LCD_CLOCKLESS", not the requested SPI driver name, so the explicit pinning misses the enabled driver and falls back to AUTO selection. Either reject those SPI-only names in this path or build an SPI ChannelConfig for them.

🤖 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 `@examples/AutoResearch/AutoResearchRemoteRunParallelTest.cpp` around lines 228
- 238, The bus selection logic in AutoResearchRemoteRunParallelTest::parse
should not map I2S_SPI or LCD_SPI to FLEX_IO, because those names still need SPI
semantics and currently resolve to the wrong driver name during pin matching.
Update the parsing branch that sets opts.mBus and opts.mBusWhich so these
SPI-only cases are either rejected here or converted into a proper SPI
ChannelConfig, and keep the existing FLEX_IO mappings only for the clockless
variants like I2S and LCD_CLOCKLESS.

Comment on lines 44 to +45
static void registerWithManager() FL_NO_EXCEPT {
ChannelManager::instance().addDriver(default_bus_priority(Bus::I2S_SPI), instancePtr());
ChannelManager::instance().addDriver(default_bus_priority(Bus::FLEX_IO, 0), instancePtr());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

registerWithManager() now demotes the I2S-SPI path below the legacy contract.

default_bus_priority(Bus::FLEX_IO, 0) is the generic FLEX_IO baseline (4), but this driver still has an explicit ESP32 priority of 10 in src/platforms/esp/32/drivers/channel_manager_esp32.cpp.hpp. That means the opt-in path can now register this engine below other SPI-capable drivers such as SPI_UNIFIED (5), so enableDrivers<Bus::FLEX_IO, 0>()/enableAllDrivers() can pick a different backend than the legacy path. Please preserve the concrete ESP32 priority here instead of the shared FLEX_IO default.

🤖 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` around lines 44 - 45,
`registerWithManager()` is now using the shared FLEX_IO baseline instead of the
ESP32-specific I2S-SPI priority, which can cause this backend to register too
low and lose selection to other SPI drivers. Update the `registerWithManager()`
path in `bus_traits.h` to preserve the concrete ESP32 priority used for this
driver (matching the explicit priority in `channel_manager_esp32.cpp.hpp`)
rather than calling `default_bus_priority(Bus::FLEX_IO, 0)`, so
`enableDrivers<Bus::FLEX_IO, 0>()` and `enableAllDrivers()` continue to prefer
the intended engine.

Comment on lines +38 to 67
namespace detail {
struct LcdCamBusHolder {
fl::shared_ptr<IChannelDriver> spi;
fl::shared_ptr<IChannelDriver> clockless;

static Driver& instance() FL_NO_EXCEPT { return *instancePtr(); }

static void registerWithManager() FL_NO_EXCEPT {
ChannelManager::instance().addDriver(default_bus_priority(Bus::LCD_SPI), instancePtr());
}
LcdCamBusHolder() FL_NO_EXCEPT
: spi(createLcdSpiEngine()),
clockless(createLcdClocklessEngine()) {}
};

template<> struct BusSupports<Bus::LCD_SPI, SpiChipsetConfig> : fl::true_type {};
inline detail::LcdCamBusHolder& lcd_cam_bus_holder() FL_NO_EXCEPT {
static detail::LcdCamBusHolder gHolder;
return gHolder;
}
} // namespace detail

template<> struct BusTraits<Bus::LCD_CLOCKLESS> {
template<> struct BusTraits<Bus::FLEX_IO, 0> {
using Driver = IChannelDriver;

static fl::shared_ptr<Driver> instancePtr() FL_NO_EXCEPT {
static fl::shared_ptr<Driver> gHolder = createLcdClocklessEngine();
return gHolder;
return detail::lcd_cam_bus_holder().clockless;
}

static Driver& instance() FL_NO_EXCEPT { return *instancePtr(); }

static void registerWithManager() FL_NO_EXCEPT {
ChannelManager::instance().addDriver(default_bus_priority(Bus::LCD_CLOCKLESS), instancePtr());
auto& holder = detail::lcd_cam_bus_holder();
ChannelManager::instance().addDriver(default_bus_priority(Bus::FLEX_IO, 0), holder.spi);
ChannelManager::instance().addDriver(default_bus_priority(Bus::FLEX_IO, 0), holder.clockless);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Use one LCD_CAM driver for the shared FLEX_IO slot.

This registers separate SPI and clockless engines for the same LCD_CAM peripheral, while instancePtr() exposes only clockless. Any path using BusTraits<Bus::FLEX_IO, 0>::instancePtr() cannot get the SPI half. Prefer a single driver/adapter whose canHandle() and show() route on isSpi() vs isClockless().

As per path instructions, parallel-IO peripherals must use a single unified ChannelEngine for both clockless and SPI modes.

🤖 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/lcd_spi/bus_traits.h` around lines 38 - 67, The
FLEX_IO bus trait is registering two separate drivers for the same LCD_CAM slot,
while instancePtr() only exposes the clockless one, so the shared peripheral is
split incorrectly. Update BusTraits<Bus::FLEX_IO, 0> and the
LcdCamBusHolder/lcd_cam_bus_holder setup to use one unified driver or adapter
for both SPI and clockless modes, and have registerWithManager() register that
single ChannelEngine instead of separate spi and clockless engines. Ensure the
unified driver’s canHandle() and show() dispatch appropriately based on isSpi()
versus isClockless().

Source: Path instructions

Comment on lines +346 to +347
// Verify Channel::create<Bus::BIT_BANG>(cfg) and FastLED.add<Bus::BIT_BANG>(cfg)
// on the host build (FL_IS_STUB). Tests run against the real BIT_BANG driver —

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use ASCII-only punctuation in this C++ comment.

Line 347 introduces a non-ASCII em dash, which violates the repository’s C++ source-text rule. Replace it with plain ASCII punctuation (for example --). As per path instructions, "ASCII-only in C++/hpp/cpp.hpp files (no emoji / non-ASCII glyphs in code comments or string literals)".

🤖 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 `@tests/fl/channels/channel.cpp` around lines 346 - 347, Update the comment in
the Channel test near Channel::create<Bus::BIT_BANG>(cfg) and
FastLED.add<Bus::BIT_BANG>(cfg) to use ASCII-only punctuation; replace the
non-ASCII em dash in the sentence about the real BIT_BANG driver with a plain
ASCII equivalent such as "--" so the C++ source-text rule is satisfied.

Source: Path instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Refactor Bus enum for cross-platform portability (generic names + vendor escape hatch)

1 participant