You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
setInUse(true/false) lifecycle: Mark all enqueued channels as in-use in show(), and release all mTransmittingChannels on completion, failed start, or destruction so user code cannot mutate buffers mid-transmission.
show() guard: Validate mPeripheral and check waitForReady() before moving enqueued channels; on timeout, release and drop the pending frame without clobbering the active transmission.
poll() multi-channel fix: Always return DriverState::DRAINING (never READY) when starting the next channel in a ≥3-channel batch; release lingering state if !mInitialized || !mPeripheral.
Bounded destructor wait: Replace the unbounded while (poll() == BUSY || poll() == DRAINING) spin loop with bounded mPeripheral->waitTxDone(2000) before deinitialize(), followed by releasing all channels.
OOM & bounds checks: Check mScratchBuffer.resize() and mEncodedBuffer.resize() outcomes and validate srcData.size() >= maxChannelSize.
Verification
bash lint passed on all 3 modified files.
bash test channel_driver_uart --debug passed (ASAN/LSAN/UBSAN), including new tests for isInUse() lifecycle, 3-channel DRAINING transitions, stuck-busy show() drop, and non-hanging destructor cleanup.
CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.
Parsing warnings: 1
Validation error: Unrecognized key: "enabled" at "reviews.pre_merge_checks"
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Change in examples/Blink per target. The left number is this PR's image flash / attributed RAM in bytes; the colored delta is the change from the merge base (red ↑ is larger, green ↓ is smaller, Same is unchanged).
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
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.
Fixes item #9 from #5492.
Summary
setInUse(true/false)lifecycle: Mark all enqueued channels as in-use inshow(), and release allmTransmittingChannelson completion, failed start, or destruction so user code cannot mutate buffers mid-transmission.show()guard: ValidatemPeripheraland checkwaitForReady()before moving enqueued channels; on timeout, release and drop the pending frame without clobbering the active transmission.poll()multi-channel fix: Always returnDriverState::DRAINING(neverREADY) when starting the next channel in a ≥3-channel batch; release lingering state if!mInitialized || !mPeripheral.while (poll() == BUSY || poll() == DRAINING)spin loop with boundedmPeripheral->waitTxDone(2000)beforedeinitialize(), followed by releasing all channels.mScratchBuffer.resize()andmEncodedBuffer.resize()outcomes and validatesrcData.size() >= maxChannelSize.Verification
bash lintpassed on all 3 modified files.bash test channel_driver_uart --debugpassed (ASAN/LSAN/UBSAN), including new tests forisInUse()lifecycle, 3-channelDRAININGtransitions, stuck-busyshow()drop, and non-hanging destructor cleanup.