-
Notifications
You must be signed in to change notification settings - Fork 208
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
i2c: implement I2C:transaction
for embedded-hal
and embedded-hal-async
#1505
Conversation
Awesome - this works now as expected in regards to #1490
I think that would be the best way to go. We also want to make every driver useable without depending on I remember we had some issues with the C2 before because the FIFO is only 16x8 bits there (while IIRC all others are 32x8) - we especially had problems with SSD1306 displays - one PR for that was #213 (I think there were follow up PRs) In general, this will be a great improvement - Thanks for taking care of this! |
…and master_write_read
…set fifo and command_list
Learned something new for the |
i2c: use CommandReg in add_cmd
Amazing! Works great for me I think I remember we usually don't limit the blocking impls to the blocking mode. Did that cause problems here? |
Yes - It prevented me to from adding |
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.
LGTM - Thanks!
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.
LGTM, thanks!
Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝
CHANGELOG.md
in the proper section.Extra:
Pull Request Details 📖
Description
This is an implementation of the
I2C::transaction
method forembedded-hal
andembedded-hal-async
. Also added native asyncread
/write
/write_read
methods not requiringembedded-hal
/embedded-hal-async
This fixes #1490
Testing
I've tested:
esp32
- sync and asyncesp32s2
- sync and asyncesp32s3
- sync and asyncesp32c2
- sync and asyncesp32c3
- sync and asyncesp32c6
- sync and asyncesp32h2
- not tested (I don't have one)sync
testing wasi2c_display
andi2c_bmp180_calibration_data
examplesasync
testing wasembassy_i2c_bmp180_calibration_data
example (new)