Skip to content
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

Slave Wire: fix TwoWire::onService() to handle repeated start #590

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

reufer
Copy link

@reufer reufer commented Dec 25, 2020

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.

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.
@stonehippo
Copy link

stonehippo commented Feb 22, 2021

@reufer

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
Copy link

CLAassistant commented Apr 9, 2021

CLA assistant check
All committers have signed the CLA.

@stonehippo
Copy link

I've submitted #669, which replaces #605 (same code, just applied against current master and resubmitted since the earlier one got stalled due to #616).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants