Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds support for the
embedded-hal-async
crate in additionto
embedded-hal
. I've done this by adding a separateAsyncSht4x
type, based on the assumption that most projects won't need to use both
the blocking
embedded-hal
traits and theembedded-hal-async
traitsat the same time, and providing
async fn
methods on a separate typewith the same names as the blocking ones seemed a bit nicer than having
one type that has both
fn measure
andasync fn measure_async
and soon.
Support for
embedded-hal-async
is gated behind theembedded-hal-async
feature flag, so the dependency is not enabled bydefault.
Note that this branch depends on my PR #6, which updates this crate to
use
embedded-hal
v1.0, and currently contains the commit from thatchange as well. Once #6 has merged, this branch will need to be rebased
onto the main branch.
It also depends on my upstream PR adding
embedded-hal-async
support tosensirion-i2c-rs
, Sensirion/sensirion-i2c-rs#30, which has beenmerged, but hasn't been published to crates.io yet. Currently, this
branch adds a Cargo
[patch]
to use a Git dep onsensirion-i2c-rs
.So, this change cannot be released to crates.io until upstream publishes
a new release of
sensirion-i2c-rs
. Hopefully they do that soon! :)