-
Notifications
You must be signed in to change notification settings - Fork 54
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
Fulfillment of the I2c trait contract #85
Conversation
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 changes! I'm worried that this adds a new panic case if the messages
input is empty and would like to discuss fixing before this is merged.
Looks good now! Thanks for your efforts! |
Co-authored-by: Nick Stevens <[email protected]>
Sorry, now rustfmt is unhappy 😮💨 |
Thanks again @ohunter, sorry it took a few tries to get things merged! |
No worries. I'm just happy to contribute 😀 |
This seeks to address the issue with the
LinuxI2CDevice
not correctly implementing the I2c trait as mentioned in rust-embedded/linux-embedded-hal#82. I am not sure whether the fix really belongs in this repo but sincei2c_msg.flags
isn't pub then it doesn't seem like there is another way. Setting the flag when the device doesn't implement the feature seems to have no effect which might lead to some confusion.