Skip to content

Commit 777eacd

Browse files
Wire probe clock stretch up to 500us (#2493)
As reported by @Rasmusfk in #2455, allow for a longer clock stretch period during probes.
1 parent 39ad2ae commit 777eacd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Wire/src/Wire.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ size_t TwoWire::requestFrom(uint8_t address, size_t quantity) {
291291
}
292292

293293
static bool _clockStretch(pin_size_t pin) {
294-
auto end = time_us_64() + 100;
294+
auto end = time_us_64() + 500;
295295
while ((time_us_64() < end) && (!digitalRead(pin))) { /* noop */ }
296296
return digitalRead(pin);
297297
}

0 commit comments

Comments
 (0)