-
Notifications
You must be signed in to change notification settings - Fork 7
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 on-target-tests and prepare for async implementation #25
Conversation
fcd05de
to
bc58e47
Compare
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.
While I didn't have time for a full review yet, my first impression is very good. Having tests running on real hardware is a great improvement for such a crate!
b8f7b09
to
b0e0eca
Compare
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.
Very nicely readable code, great work!
I can't claim that I followed every step in the implemented I²C state machine, but scanning through it, it all looked very convincing. Together with the working on-target test, I have no doubts that this is fine.
Very useful approach to verify the I²C communication against the hardware peripheral on the same chip!
Thank you ! I am busy with something right now and for a little while so the next update will probably take a couple of months :( |
I think we should do a release based on rp2040-hal 0.10.0, as it is needed for updating the BSPs. |
I think that’s a great idea :) |
Using 2.2kOhm pull-ups on SDA & STL, this impl can reach the target 400KHz in release mode.
Write operation on a 10bit address:
Read operation on a 10bit address:
The tests run the bus at 200kHz to avoid requiring external pull-ups.