-
Notifications
You must be signed in to change notification settings - Fork 774
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
add i2c trait #64
add i2c trait #64
Conversation
mostly copied from embedded-hal; transactional mod can be sorted later |
I'm not sure about the design. There are many traits: Read, Write, WriteIter, WriteRead, WriteIterRead, Transactional.
The Transactional one is nice to have :D Unfortunately it's not possible to implement it on nrf52, but I imagine it can be useful for other chips/ |
@Dirbaio as far as |
Yeah, having Also, |
This is copied from embedded-hal. Why are there different traits there? |
I did some archeology on embedded-hal, only thing I could find is this. The commit that adds them already has them this way. Also from Matrix:
It's a good point for UART and SPI. The current UART trait isn't split, we should maybe split it. Still, i'm not very convinced it's good to split I2C (neither for the errors nor for consistency) |
Don't delete write_read. It's not the same as write + read: It does a Repeated Start, instead of Stop+Start. |
👍 |
closes #51.