-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use embedded-hal 1.0.0 #1
Conversation
@eldruin I've updated the driver to use embedded-hal 1.0.0 because I have a project in which I need to share the same SPI bus between two devices. However, it seems that the specs fail on some of the architectures and I have no clue what is wrong. Could you please advise? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your work!
The problem in the CI is because of the embedded-hal-bus
dependency but we do not need it here.
The tests and examples would need to be adapted as well, though.
For that you can update the embedded-hal-mock
dependency to embedded-hal-mock = { version="0.10", default-features=false, features=["eh1"]}
You can have a look at this PR for inspiration, for example: https://github.com/eldruin/bmi160-rs/pull/7/files
Cargo.toml
Outdated
@@ -21,7 +21,8 @@ include = [ | |||
edition = "2018" | |||
|
|||
[dependencies] | |||
embedded-hal = "0.2.6" | |||
embedded-hal = { version = "1.0.0"} | |||
embedded-hal-bus = { version = "0.2.0" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
embedded-hal-bus = { version = "0.2.0" } |
We do not need this in a driver
Cargo.toml
Outdated
@@ -21,7 +21,8 @@ include = [ | |||
edition = "2018" | |||
|
|||
[dependencies] | |||
embedded-hal = "0.2.6" | |||
embedded-hal = { version = "1.0.0"} | |||
embedded-hal-bus = { version = "0.2.0" } | |||
|
|||
[dev-dependencies] | |||
linux-embedded-hal = "0.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linux-embedded-hal = "0.3" | |
linux-embedded-hal = "0.4" |
323b547
to
db5024e
Compare
db5024e
to
90ce11d
Compare
@eldruin I've updated the tests and all of them are passing now. However, I don't know how to solve the |
Thank you! The CI configuration was a bit outdated. I have updated it and now everything passes except one trivial error reported by clippy. |
Would you mind giving me your advice on rust-embedded/embedded-hal#608 please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you.
Sorry, could you also update the example in the readme?
215f1bd
to
bfe2380
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you!
For the record, I have published this in version 1.0.0. |
Update lib to use embedded-hal 1.0.0