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
I am working on a project where I need to do some non-blocking reading from the uart peripheral based on the embedded_io traits. The regular Read trait specifies a blocking read such that it will wait for at least one byte to be available to be read. If one wants to do a non-blocking read, you need to use the ReadReady trait function read_ready to first check if there is data available before doing the read.
However, only the Read trait is implemented (in #727 and #781 ) for the split and unsplit peripherals, but not the ReadReady trait. Is there a reason this has been left out?
It looks like the implementation could be quite simple, something like this for the Reader split peripheral (not tested):
I am working on a project where I need to do some non-blocking reading from the uart peripheral based on the
embedded_io
traits. The regularRead
trait specifies a blocking read such that it will wait for at least one byte to be available to be read. If one wants to do a non-blocking read, you need to use theReadReady
trait functionread_ready
to first check if there is data available before doing the read.However, only the
Read
trait is implemented (in #727 and #781 ) for the split and unsplit peripherals, but not theReadReady
trait. Is there a reason this has been left out?It looks like the implementation could be quite simple, something like this for the
Reader
split peripheral (not tested):Fixed in:
embedded_io::ReadReady
andWriteReady
traits for uart peripheral #837)The text was updated successfully, but these errors were encountered: