Repository navigation
docs(rx/flexio): FlexIO RX backend docs + enum-comment refresh (Phase 4 of #2764) - #2770
Conversation
… 4 of #2764) Final phase of #2764 — documents the new FlexIO RX backend now that the skeleton (#2765), hardware (#2766), bench harness (#2767), and ObjectFLED loopback (#2769) have all landed on master. Three changes, all documentation-side; no runtime behaviour changes: 1. `src/fl/channels/rx/types.h`: - `RxBackend::PLATFORM_DEFAULT` comment now mentions FLEXIO as an opt-in alternative on Teensy 4 with a pointer to #2764. - `RxBackend::FLEXIO` comment notes that hardware verification ran via `flexioRxBenchmark` (1/10/100 kHz square wave) and `flexioObjectFledTest` (5-pattern ObjectFLED loopback). 2. `src/fl/channels/rx.h`: - Matching `RxDeviceType::PLATFORM_DEFAULT` comment refreshed. 3. `agents/docs/hardware-autoresearch.md`: - New top-level section "FlexIO RX Backend (Teensy 4 — opt-in)" covering: * How to select the backend in C++ and Python * Pin map (Teensy pin -> FLEXIO1 input -> IOMUXC offsets) * Peripheral resource budget (Shifter 0, Timer 0, DMA, FLEXIO1 functional clock) * Verification surface (flexioRxBenchmark + flexioObjectFledTest with acceptance criteria) * Explicit note that `PLATFORM_DEFAULT` stays on FlexPWM until the follow-up default-switch PR Intentionally NOT in this PR (per the #2764 parent-issue plan): - Switching `PLATFORM_DEFAULT` to FLEXIO on Teensy 4 — separate PR after both backends are equally exercised in the dev-bench matrix. - Adding `bash autoresearch teensy40 --rx-backend=flexio` to the nightly hardware test matrix — gated on the Teensy 4.1 RTV-silicone hardware issue (#2760) being resolved. Verification: - ✅ C++ lint clean - Docs-only changes; no host-test regressions possible Refs #2764 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
📝 WalkthroughWalkthroughThis PR documents the opt-in FlexIO RX backend feature for Teensy 4.x through coordinated enum, header, and hardware guide updates. Supporting test infrastructure is updated to route Ctrl-C through the global interrupt handler. ChangesFlexIO RX Backend Documentation and Testing
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
…andler PR #2769 introduced a `try/except KeyboardInterrupt` block on the serial-open path of `test_flexio_rx_objectfled.py` that re-raised the signal directly. The project-wide KBI002 lint requires that KeyboardInterrupt handlers either call `_thread.interrupt_main()` or route through `handle_keyboard_interrupt(ki)` from `ci.util.global_interrupt_handler`. Importing the helper and calling it before the re-raise keeps the original abort-without-stack-trace UX while satisfying the lint check. The KBI002 violation was surfaced by the post-stop hook on the Phase 4 branch, which lints the master state pulled into the docs branch. Refs #2764, PR #2769 review Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/fl/channels/rx.h`:
- Line 164: The enum comment for PLATFORM_DEFAULT contains non-ASCII punctuation
(e.g. an em-dash); update the comment attached to PLATFORM_DEFAULT so it uses
only 7-bit ASCII punctuation (replace em-dash with '-' or '--', any fancy
quotes/ellipses with plain ASCII equivalents) and ensure the entire comment text
is strictly ASCII.
In `@src/fl/channels/rx/types.h`:
- Around line 9-13: Update the header comments in src/fl/channels/rx/types.h to
use only 7-bit ASCII: replace any em-dashes, fancy quotes or other non-ASCII
punctuation in the enum comment block (lines referencing PLATFORM_DEFAULT, RMT,
ISR, FLEXPWM, FLEXIO and the FLEXIO comment text) with plain ASCII equivalents
(e.g., use "-" for em dash, "'" for quotes, and remove backticks), ensuring all
header-comment characters are 7-bit ASCII to comply with the src/fl/**/*.h rule.
🪄 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: 7388b4cb-8812-425b-a095-404f4ca6ec7f
📒 Files selected for processing (4)
agents/docs/hardware-autoresearch.mdci/autoresearch/test_flexio_rx_objectfled.pysrc/fl/channels/rx.hsrc/fl/channels/rx/types.h
| */ | ||
| enum class RxDeviceType : u8 { | ||
| PLATFORM_DEFAULT = 0, ///< Platform default (RMT on ESP32, FLEXPWM on Teensy 4.x) | ||
| PLATFORM_DEFAULT = 0, ///< Platform default (RMT on ESP32, FLEXPWM on Teensy 4.x; FLEXIO available as opt-in on Teensy 4 — see FastLED#2764) |
There was a problem hiding this comment.
Use ASCII-only punctuation in this updated enum comment.
The modified comment uses non-ASCII punctuation; this header path requires strictly 7-bit ASCII for comment-only updates.
As per coding guidelines, “for changes restricted to comments in headers under src/fl/**/*.h … source text is strictly 7-bit ASCII.”
🤖 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/rx.h` at line 164, The enum comment for PLATFORM_DEFAULT
contains non-ASCII punctuation (e.g. an em-dash); update the comment attached to
PLATFORM_DEFAULT so it uses only 7-bit ASCII punctuation (replace em-dash with
'-' or '--', any fancy quotes/ellipses with plain ASCII equivalents) and ensure
the entire comment text is strictly ASCII.
| PLATFORM_DEFAULT = 0, ///< Use the recommended backend for the active platform (RMT on ESP32; FlexPWM on Teensy 4.x with FLEXIO as an opt-in alternative — see FastLED#2764; native RX on stub/host builds). | ||
| RMT = 1, ///< ESP32-only RMT capture backend. | ||
| ISR = 2, ///< Platform-neutral interrupt-driven edge capture backend when available. | ||
| FLEXPWM = 3, ///< Teensy 4.x-only FlexPWM capture backend. | ||
| FLEXIO = 4 ///< Teensy 4.x-only FlexIO capture backend (FLEXIO1; FLEXIO2 is owned by the TX driver). See FastLED#2764. | ||
| FLEXIO = 4 ///< Teensy 4.x-only FlexIO capture backend (FLEXIO1 — FLEXIO2 is owned by the WS2812 TX driver). Hardware-verified by `flexioRxBenchmark` (1/10/100 kHz square wave) and `flexioObjectFledTest` (5-pattern ObjectFLED loopback). See FastLED#2764. |
There was a problem hiding this comment.
Replace Unicode punctuation in header comments with 7-bit ASCII.
These updated comments include non-ASCII punctuation (for example, em dash), which violates the header-comment ASCII rule for src/fl/**/*.h. Replace with plain ASCII characters (-, ', etc.).
As per coding guidelines, “for changes restricted to comments in headers under src/fl/**/*.h … source text is strictly 7-bit ASCII.”
🤖 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/rx/types.h` around lines 9 - 13, Update the header comments
in src/fl/channels/rx/types.h to use only 7-bit ASCII: replace any em-dashes,
fancy quotes or other non-ASCII punctuation in the enum comment block (lines
referencing PLATFORM_DEFAULT, RMT, ISR, FLEXPWM, FLEXIO and the FLEXIO comment
text) with plain ASCII equivalents (e.g., use "-" for em dash, "'" for quotes,
and remove backticks), ensuring all header-comment characters are 7-bit ASCII to
comply with the src/fl/**/*.h rule.
Summary
Phase 4 — the final phase — of #2764. Documents the FlexIO RX backend that the four previous PRs in the series brought up. No runtime behaviour changes.
src/fl/channels/rx/types.hRxBackend::PLATFORM_DEFAULTdoc note mentions FLEXIO as Teensy-4 opt-in;RxBackend::FLEXIOmentions which RPCs hardware-verify itsrc/fl/channels/rx.hRxDeviceType::PLATFORM_DEFAULTcomment refreshagents/docs/hardware-autoresearch.mdWhat the new docs section covers
RxBackend::FLEXIO) and Python (flexioRxBenchmark/flexioObjectFledTestRPCs)PLATFORM_DEFAULTstays on FlexPWM; switching to FLEXIO is held back to a separate PR per the parent-issue planIntentionally NOT in this PR (per the #2764 plan)
PLATFORM_DEFAULTto FLEXIO on Teensy 4 — separate PR after both backends are equally exercised in the dev-bench matrixbash autoresearch teensy40 --rx-backend=flexioto the nightly hardware test matrix — gated on the Teensy 4.1 RTV-silicone hardware issue (Teensy 4.1 hardware verification deferred (RTV-silicone interference) #2760) being resolvedVerification
Refs
flexioRxBenchmark+ square-wave harness): feat(autoresearch): flexioRxBenchmark RPC + Python harness (Phase 2 of #2764) #2767 (merged)🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Tests