Repository navigation
feat(rp): centralize PIO and DMA resource ownership - #3662
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughRP2040/RP2350 PIO drivers now share a resource manager backed by an atomic ownership ledger. Clockless and SPI drivers use it to claim, retry, clean up, and release PIO state machines, DMA channels, and GPIO pins. ChangesRP resource ownership
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant ClocklessController
participant RpPioDmaResourceManager
participant PicoSDK
participant RpResourceLedger
ClocklessController->>RpPioDmaResourceManager: claimPioStateMachine
RpPioDmaResourceManager->>PicoSDK: claim PIO state machine
RpPioDmaResourceManager->>RpResourceLedger: record PIO ownership
ClocklessController->>RpPioDmaResourceManager: claimDmaChannel
RpPioDmaResourceManager->>PicoSDK: claim DMA channel
RpPioDmaResourceManager->>RpResourceLedger: record DMA ownership
ClocklessController->>RpPioDmaResourceManager: claimPins
RpPioDmaResourceManager->>RpResourceLedger: record pin ownership
ClocklessController->>RpPioDmaResourceManager: release resources during cleanup
Possibly related issues
✨ 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 |
This was referenced Jul 15, 2026
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.
Summary
Validation
bash test tests/platforms/arm/rp/rpcommon/rp_resource_ledger.cppuv run --no-sync python ci/lint_cpp/run_all_checkers.py --no-rustfbuild .build/pio/rp2040 build -e rp2040bash lint's Rust checker cannot run locally because the installed Rust toolchain lacksx86_64-pc-windows-msvc; the Python-only C++ checker passed. fbuild deployment compilation passed, but the separate portless CDC-to-BOOTSEL transition regression is documented on FastLED/fbuild#1040.Closes #3653
Summary by CodeRabbit
New Features
Tests