Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork738
Slave Wire: fix TwoWire::onService() to handle repeated start#590
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Combined I2C write/read transactions with repeated startconditions were not possible, since only onRequestCallback wascalled. Any previously received data was passed toonReceiveCallback as part of a subsequent master write.
stonehippo commentedFeb 22, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I don't think this is quite right yet.The existing onService handler in Wire.cpp seems to have a couple of issues (onRequest and onReceive are backwards, and you have to do two writes to get them to the onReceive callback), and your changes don't fully address them. I've taken a pass at rewriting the whole function and I think I've got it working correctly, including handling repeated starts. Since you've already take a shot at this, would you mind trying out the changes in#605? |
CLAassistant commentedApr 9, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Combined I2C write/read transactions with repeated start
conditions were not possible, since only onRequestCallback was
called. Any previously received data was passed to
onReceiveCallback as part of a subsequent master write.