Skip to content

stm32: no way to tell whether operations on a UART in Blocking mode would block #5214

@scgtrp

Description

@scgtrp

Given a Uart(Rx)<'_, Blocking>, a reasonable thing one might want to do would be to poll it for data if there is any to read, but not block if there isn't.

There seems to be no way to do this? There is a nb_read that does that exact thing, but it's behind pub(crate), as is any clear way to access RXNE directly to check such a thing oneself.

Can we have e.g. impl ReadReady for non-async UARTs?

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