Skip to content

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

@MarSik

Description

@MarSik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions