8000 Double I2C read in one transaction skips a clock pulse (#5528) by TD-er · Pull Request #6654 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Double I2C read in one transaction skips a clock pulse (#5528) #6654

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

Merged
merged 9 commits into from
Oct 27, 2019
Prev Previous commit
Next Next commit
[I2C] Restore clock stretch functionality during transfer
  • Loading branch information
TD-er committed Oct 26, 2019
commit aac129518b9c08b924e8ea7c01229646f8812837
2 changes: 2 additions & 0 deletions cores/esp8266/core_esp8266_si2c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ unsigned char Twi::writeTo(unsigned char address, unsigned char * buf, unsigned
while (!SDA_READ() && (i++) < 10)
{
twi_scl_valley();
WAIT_CLOCK_STRETCH();
busywait(twi_dcount);
}
return 0;
Expand Down Expand Up @@ -439,6 +440,7 @@ unsigned char Twi::readFrom(unsigned char address, unsigned char* buf, unsigned
while (!SDA_READ() && (i++) < 10)
{
twi_scl_valley();
WAIT_CLOCK_STRETCH();
busywait(twi_dcount);
}
return 0;
Expand Down
0