Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to embedded-hal 1.0 #6

Merged
merged 1 commit into from
Oct 13, 2024
Merged

Conversation

hawkw
Copy link
Contributor

@hawkw hawkw commented Jun 9, 2024

This commit updates the library to embedded-hal v1.0. This was, overall, a pretty trivial update. Since this is a breaking change, I've also updated the version number to v0.2.0.

This commit updates the library to `embedded-hal` v1.0. This was,
overall, a pretty trivial update. Since this is a breaking change, I've
also updated the version number to v0.2.0.
hawkw added a commit to hawkw/sht4x that referenced this pull request Jun 9, 2024
This commit adds support for the `embedded-hal-async` crate in addition
to `embedded-hal`. I've done this by adding a separate `AsyncSht4x`
type, based on the assumption that most projects won't need to use both
the blocking `embedded-hal` traits and the `embedded-hal-async` traits
at the same time, and providing `async fn` methods on a separate type
with the same names as the blocking ones seemed a bit nicer than having
one type that has both `fn measure` and `async fn measure_async` and so
on.

Support for `embedded-hal-async` is gated behind the
`embedded-hal-async` feature flag, so the dependency is not enabled by
default.

Note that this branch depends on my PR sirhcel#6, which updates this crate to
use `embedded-hal` v1.0, and currently contains the commit from that
change as well. Once sirhcel#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 to
`sensirion-i2c-rs`, Sensirion/sensirion-i2c-rs#30, which has been
[merged], but hasn't been published to crates.io yet. Currently, this
branch adds a Cargo `[patch]` to use a Git dep on `sensirion-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! :)

[merged]: Sensirion/sensirion-i2c-rs@f7b9f3a
@bbustin
Copy link

bbustin commented Sep 5, 2024

Please also see my pull request which added support for embedded-hal-1.0 and async support gated behind a feature: #5

@sirhcel sirhcel merged commit d066074 into sirhcel:master Oct 13, 2024
@sirhcel
Copy link
Owner

sirhcel commented Oct 13, 2024

Thank you very much for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants