-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_uart: Add ReadAtLeast and ReadExactly methods
Deprecate the existing Read method in favor of two read variants that cover more use cases. ReadExactly maps to the existing Read semantics and blocks until the buffer is completely filled. ReadAtLeast allows for blocking until at least the specified bytes are received, but allows for more to be delivered if available. ReadAtLeast is useful in cases where you don't know exactly how many bytes will be returned and don't know exactly when to expect them. Update mcuxpresso implementation to support this new feature. Provide default implementations of new variant to ease transition of existing implementations. Bug: 368149122 Change-Id: If7674937125ff56e70953ffce3c6e323f721034f Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/236268 Reviewed-by: Edward Shin <[email protected]> Reviewed-by: Taylor Cramer <[email protected]> Reviewed-by: Jonathon Reinhart <[email protected]> Commit-Queue: Austin Foxley <[email protected]> Lint: Lint 🤖 <[email protected]> Presubmit-Verified: CQ Bot Account <[email protected]> Docs-Not-Needed: Taylor Cramer <[email protected]>
- Loading branch information
Showing
4 changed files
with
162 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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