Skip to content

Commit

Permalink
Wire probe clock stretch up to 500us (#2493)
Browse files Browse the repository at this point in the history
As reported by @Rasmusfk in #2455, allow for a longer
clock stretch period during probes.
  • Loading branch information
earlephilhower authored Sep 24, 2024
1 parent 39ad2ae commit 777eacd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/Wire/src/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ size_t TwoWire::requestFrom(uint8_t address, size_t quantity) {
}

static bool _clockStretch(pin_size_t pin) {
auto end = time_us_64() + 100;
auto end = time_us_64() + 500;
while ((time_us_64() < end) && (!digitalRead(pin))) { /* noop */ }
return digitalRead(pin);
}
Expand Down

0 comments on commit 777eacd

Please sign in to comment.