Closed eldruin closed 5 years ago
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @posborne (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.
@andy-sdc confirmed that using this in the implementation of i2c::WriteRead
in linux-embedded-hal
solved the original issue (https://github.com/rust-embedded/linux-embedded-hal/issues/25) and the hardware device works as expected with the driver.
Hi @posborne, did you have any chance to look at this?
Hi @posborne, did you have any chance to look at this?
Sorry, will try to take a look later today, but bug me again if I haven't submitted a review by tomorrow.
Hi @posborne, here is the reminder :)
Great, I just fixed them.
bors r+
Ah, haven't set bors up on this one yet. Merging, thanks for the changes!
This alternative is based on #50 but goes further and implements the
I2CTransfer
trait forI2CDevice
s. With this proposal, it is possible to use the bus directly and send messages as well as send messages to a existingI2CDevice
. The most relevant change compared to #50 is in theI2CMessage
trait, where the address has been separated into a separate method similar towith_flags()
so that the same trait can be used for transfers with anI2CDevice
without having to specify the address repeatedly as this is fixed for a givenI2CDevice
.