rust-embedded / rust-i2cdev

Rust library for interfacing with i2c devices under Linux
Apache License 2.0
205 stars 53 forks source link

Fulfillment of the I2c trait contract #85

Closed ohunter closed 4 months ago

ohunter commented 4 months ago

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 since i2c_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.

nastevens commented 4 months ago

Looks good now! Thanks for your efforts!

nastevens commented 4 months ago

Sorry, now rustfmt is unhappy :face_exhaling:

nastevens commented 4 months ago

Thanks again @ohunter, sorry it took a few tries to get things merged!

ohunter commented 4 months ago

No worries. I'm just happy to contribute 😀