Add transmission done query mechanism to embedded-io serial traits (nonblocking flush).

Open
#656 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
embedded-iot

Research direction

Start with the embedded-io serial traits and blocking flush() in src/lib.rs, then compare the ReadReady and WriteReady traits and the embedded-io-async boundary. Determine the appropriate nonblocking transmission-completion mechanism for serial traits. Done means the traits support checking transmission completion without blocking while preserving the existing blocking API, with coverage for the new behavior.

Written by the indexing model from the issue text.

Description

The original serial traits supported the flush() -> nb::Result<> variant that could return WouldBlock. This was useful in async code that could wait for serial TxDone interrupt to trigger before checking again.

The traits in embedded-io only have blocking flush() call.

It could be argued that embedded-io contains only the blocking traits and embedded-io-async should be implemented for the non-blocking variants. However the ReadReady and WriteReady traits show that the non-blocking use case is important too.

Dominant language
Rust
Stars
2.7k
Forks
282
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-embedded/embedded-hal

All issues in rust-embedded/embedded-hal

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.