-
Notifications
You must be signed in to change notification settings - Fork 25
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.0-alpha.11
#76
Conversation
2457d3a
to
da84971
Compare
8c42c04
to
f6748d0
Compare
see [their changelog][eh-changelog] for further details. [eh-changelog]: https://github.com/rust-embedded/embedded-hal/blob/v1.0.0-alpha.11/embedded-hal/CHANGELOG.md
f6748d0
to
de956ee
Compare
thanks all for your feedback! i've now added a new transaction type |
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.
Works for me with my W5500 crate.
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.
Thanks for the contribution!
I'm not too familiar with SPI, so this is only a superficial review. However, I noticed a few issues.
Reviews by other users or contributors are welcome! Otherwise I'd merge this PR once the open issues are resolved.
//! assert_eq!(spi.read().unwrap(), 0xFF); | ||
//! FullDuplex::write(&mut spi, 0x09).expect("TODO: panic message"); | ||
//! assert_eq!(FullDuplex::read(&mut spi).unwrap(), 0x0A); | ||
//! FullDuplex::write(&mut spi, 0xFE).expect("TODO: panic message"); |
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.
Should these TODO messages be in here (i.e. are they TODOs for the reader)? Generally I'd just .unwrap()
in example code.
|
||
/// spi::TransferInplace implementation for Mock | ||
/// | ||
/// This writes the provided response to the buffer and will cause an assertion if the written data does not match the next expectation |
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.
Nitpick: The documentation is not correct anymore (the impl is for SpiBus
, not TransferInplace
). Also, it's a bit weird that there are docs only for one of the functions, not for the others.
If the documentation does not add much value, I'd remove it in this case for consistency reasons.
Operation::DelayUs(delay) => { | ||
let w = self | ||
.next() | ||
.expect("no expectation for spi::transaction call"); |
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.
This should probably be spi::delay
?
Operation::DelayUs(delay) => { | ||
let w = self | ||
.next() | ||
.expect("no expectation for spi::transaction call"); |
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.
Again: This should probably be spi::delay
?
Additionally, the changes from #75 were merged into |
@rursprung let me know if you want help with this :) |
I opened #85 with the feedback applied & rebased onto |
see their changelog for further details.