Skip to content

refactor(rp): legacy clockless onto SlimBridgeController over ChannelEngineRpPio (#4589) - #4619

Merged
zackees merged 1 commit into
masterfrom
feat/slim-bridge-rp-4589
Sep 25, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/slim-bridge-rp-4589

Conversation

@zackees

@zackees zackees commented Sep 25, 2026

Copy link
Copy Markdown
Member

Closes #4589. Part of #4601 / #4580. Follows the Teensy 4.x precedent (#4617).

Change

  • rpcommon/clockless_rp_pio.h: ClocklessController<...> (RP2040/RP2350) is now an alias for ClocklessRpPio, a fl::SlimBridgeController<DATA_PIN, TIMING, RGB_ORDER, WAIT_TIME, BusTraits<Bus::FLEX_IO, 0>> over the existing ChannelEngineRpPio. The direct PIO/DMA controller (its own SM/DMA claim, DMA ISR, bit packer) is removed.
  • FASTLED_RP2040_CLOCKLESS_PIO 0 still selects the blocking Cortex-M0 bit-bang controller.
  • Deleted rpcommon/clockless_rp_pio_parallel.h (ParallelClocklessController): unreferenced by any source, example or test. The opt-in FASTLED_RP2040_CLOCKLESS_PIO_AUTO path is untouched.
  • READMEs updated.

Bloat (bash bloat rp2040 --example Blink --build, same base SHA)

before (origin/master) after delta
Total flash (attributed) 93,053 B 128,121 B +35,068
firmware.bin 103,756 B 136,948 B +33,192
firmware.uf2 207,872 B 273,920 B +66,048
RAM 45,741 B 46,734 B +993

Verification

  • bash lint: pass
  • bash test slim_bridge_controller: pass. bash test --cpp: 313/313 unit, 95/95 examples
  • bash compile rp2040 --examples Blink (via bloat), rp2040 --examples BlinkParallel, rp2350 --examples Blink: pass

Known trade-offs (maintainer-accepted)

  • Flash increase (~33 KB on rp2040 Blink) from linking ChannelManager and the channel engine.
  • Strips go out one after another unless they are on consecutive pins with the same length and timing. The legacy controller drove every strip concurrently on its own PIO SM.
  • About 32x DMA memory per data byte in the engine's encoding.
  • XTRA0 is ignored.
  • There is no blocking fallback when no SM or DMA channel is free.

Hardware validation deferred.

🤖 Generated with Claude Code

…EngineRpPio (#4589)

The RP2040/RP2350 legacy addLeds<> ClocklessController is now a
fl::SlimBridgeController over BusTraits<Bus::FLEX_IO, 0>
(ChannelEngineRpPio), removing the duplicate direct PIO/DMA controller.
The unused ParallelClocklessController header is deleted. With
FASTLED_RP2040_CLOCKLESS_PIO 0 the blocking M0 controller is kept.

Maintainer-accepted: not flash-neutral (rp2040 Blink +33 KB);
hardware validation deferred.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zackees
zackees merged commit cfd04d2 into master Sep 25, 2026
91 checks passed
@zackees
zackees deleted the feat/slim-bridge-rp-4589 branch September 25, 2026 05:01
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Sep 25, 2026
@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown

Review in Change Stack →

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 configuration

Configuration used: Repository: FastLED/FastLED/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 0a06b8fe-56a0-4ec3-9b65-aa341eee281d

📥 Commits

Reviewing files that changed from the base of the PR and between ef5d302 and e9b9c13.

📒 Files selected for processing (8)
  • src/platforms/arm/rp/README.md
  • src/platforms/arm/rp/rp2040/README.md
  • src/platforms/arm/rp/rp2040/clockless_arm_rp2040.h
  • src/platforms/arm/rp/rp2350/README.md
  • src/platforms/arm/rp/rp2350/clockless_arm_rp2350.h
  • src/platforms/arm/rp/rpcommon/README.md
  • src/platforms/arm/rp/rpcommon/clockless_rp_pio.h
  • src/platforms/arm/rp/rpcommon/clockless_rp_pio_parallel.h
 _________________________________________________________________
< I have no memory of this place...but I'll find the bugs anyway. >
 -----------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

zackees added a commit that referenced this pull request Sep 25, 2026
…4619 follow-up) (#4626)

Follow-up to #4619 (issue #4589) review findings:
- RpPioTxPeripheral::deinitialize() now parks every lane as a SIO output
  driven LOW instead of an input, so the line no longer floats between
  frames after ChannelEngineRpPio tears the peripheral down.
- ClocklessRpPio::init() drives DATA_PIN LOW as an output before the
  first frame (the old controller called setOutput()).
- PARALLEL.md, clockless_rp_pio_auto.h and the Parallel_IO example no
  longer reference the deleted ParallelClocklessController.

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

slim bridge: RP2040/RP2350 PIO clockless

1 participant