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 think probably it's reasonable to return an Option from read_byte based on whether or not we're able to read, then we can just converted this into the appropriate return type in the embedded_hal_nb implementation (e.g. Some -> Ok, None -> Err).
Had another look and while for something like read_byte returning Option even feels more natural there are other places where it's not that easy.
e.g. write_byte,flush_tx, some functions in the crypto-accelerator drivers (some are questionable - e.g. Hmac::configure never returns WouldBlock), there are usages in SPI and TWAI, in PeriodicTimer::wait and ADC
Should be a general decision - not just for SPI.
If we don't want that - what about embedded-hal-nb?
The text was updated successfully, but these errors were encountered: