Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Good question! As far as I can tell from the docs, it looks like I2C is still synchronous [1], but this will be my first async embedded Rust project, so I'm still unfamiliar with the general shape and functionality of things.
For comparison, things like WiFi are definitely async [2]
[1] https://docs.rs/esp32s2-hal/latest/esp32s2_hal/i2c/index.htm...
[2] https://github.com/esp-rs/esp-wifi/blob/main/examples-esp32s...
In the esp-hal, they appear to offer both sync and async I2C implementations, depending on what works best for an application. Since the async implementation is gated by a feature, it may not show up in the docs you linked.
Async implementation: https://github.com/esp-rs/esp-hal/blob/main/esp-hal-common/s...
You can also see the async feature mentioned here: https://docs.rs/crate/esp32s2-hal/latest/features