Closed hawkw closed 5 months ago
Thank you very much for your contribution
Hey @psachs, thanks for maintaining this crate! I noticed that this PR was merged, but no release was pushed to crates.io so far. Would you mind doing such a release? That would allow async support for the SGP30 to get merged: https://github.com/dbrgn/sgp30-rs/pull/19
@dbrgn I just release v0.4.0 with the async support. You should now be able to merge the sgp30 async support as well
@psachs great, thanks!
Now that the
embedded-hal-async
crate has released version 1.0, it would be nice to be able to use the async versions ofembedded-hal
's traits for writing drivers for Sensirion I2C devices. This commit adds a newi2c_async
module which provides versions of the APIs in thei2c
module that useembedded-hal-async
's asyncI2c
trait rather thanembedded-hal
's blockingI2c
trait.The new module is feature-flagged, so that users who don't need
embedded-hal-async
support can avoid the additional dependency, and it's off by default. Ideally, it would be nice if the blockingembedded-hal
APIs could also be feature-flagged, so that async-only users don't have to pull them in, but that would be a breaking change. I've also taken the liberty of adding support for thedoc_cfg
anddoc_auto_cfg
RustDoc features when building on docs.rs, so that the documentation displays that the new module is feature-flagged.Closes #24