Open
Description
Async and blocking currently share some "setup" code. This setup code needs to wait for some things, for example here:
embassy/embassy-stm32/src/i2c/v2.rs
Line 164 in a2d4bab
This waiting is done blockingly, it should be done asynchronously in async code. This means we can share less code, but that's fine.
Once this is done, async timeouts should be simplified to using with_timeout
at the top level, instead of passing a check_timeout
closure through everywhere. This will ensure user timeouts also behave nicely when they use with_timeout
themselves instead of using the builtin timeouts, or select
.