Skip to content

feat(i2s): real deinitialize() on modern peripheral (#3526 Phase 2b) - #3541

Merged
zackees merged 1 commit into
masterfrom
feat/i2s-phase2b-deinit-3526
Jul 1, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/i2s-phase2b-deinit-3526

Conversation

@zackees

@zackees zackees commented Jul 1, 2026

Copy link
Copy Markdown
Member

deinitialize() now calls i2s_stop() when mBusy. Full teardown deferred to #3489 singleton migration. Test plan: bash test --cpp 345/345, bash lint clean.

`I2sPeripheralEsp32DevEsp::deinitialize()` now calls `i2s_stop()` when
`mBusy` is set at deinit time, so a mid-transmit teardown clears the
peripheral's `tx_start` bit and stops DMA — no drift into the next
caller's buffer.

Note: this is not yet a FULL teardown. The ISR handle + DMA descriptor
allocations from `i2s_init()` are still held onto so a re-init doesn't
leak. That matches Yves's `gInitializedI2sInitialized` one-shot
behavior. Full teardown lands with #3489 singleton migration
since those resources are truly process-lifetime.

## Scope

Small, safe, isolated change:
- `deinitialize()` — real: calls `i2s_stop()` when busy.
- Everything else unchanged.

## Verification

- `bash test --cpp`: 345/345 pass.
- `bash lint --cpp`: clean.
- Bench: no invocation path currently exercises deinit + busy state
  (Bus::FLEX_IO,0 still binds to I2S_SPI; the modern peripheral isn't
  wired yet — Phase 2d), so this change is dormant on bench until
  Phase 2d lands. Confirmed by the previous PR (#3540) that the
  binary boots cleanly.

Part of #3516 meta / #3526 Phase 2b.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@zackees, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 3 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fc20724c-38e7-4ba3-8de6-5f6344a5e589

📥 Commits

Reviewing files that changed from the base of the PR and between 1b828dc and 900d16d.

📒 Files selected for processing (1)
  • src/platforms/esp/32/drivers/i2s/i2s_peripheral_esp32dev_esp.cpp.hpp
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/i2s-phase2b-deinit-3526

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
zackees merged commit 16924f1 into master Jul 1, 2026
11 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jul 1, 2026
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jul 1, 2026
@zackees
zackees deleted the feat/i2s-phase2b-deinit-3526 branch August 21, 2026 19:15
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.

1 participant