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
The SpiDevice trait's documentation is now very explicit that operations may return before they are finished. That brings up some questions:
What happens with adjacent operations? E.g. if there are two back-to-back write() calls, is it legal for the second call to return Err(Busy), or is it expected that this call will block until it can enqueue the operation?
In the same vein, is calling write(); write(); acceptable for drivers, or does it have to be write(); flush(); write() to not risk an error?
What about other traits like I2C? They do not mention that returning early is acceptable. Does that imply that they block until the bus is idle? If not, why don't they have a flush() operation. If so, shouldn't that be explicitly documented?
The text was updated successfully, but these errors were encountered:
The
SpiDevice
trait's documentation is now very explicit that operations may return before they are finished. That brings up some questions:write()
calls, is it legal for the second call to returnErr(Busy)
, or is it expected that this call will block until it can enqueue the operation?write(); write();
acceptable for drivers, or does it have to bewrite(); flush(); write()
to not risk an error?flush()
operation. If so, shouldn't that be explicitly documented?The text was updated successfully, but these errors were encountered: