From 777eacdfc355588e0cfb611f9d147049d5b7c72d Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Tue, 24 Sep 2024 06:58:41 -0700 Subject: [PATCH] Wire probe clock stretch up to 500us (#2493) As reported by @Rasmusfk in #2455, allow for a longer clock stretch period during probes. --- libraries/Wire/src/Wire.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Wire/src/Wire.cpp b/libraries/Wire/src/Wire.cpp index c729878c9..5646fc9d0 100644 --- a/libraries/Wire/src/Wire.cpp +++ b/libraries/Wire/src/Wire.cpp @@ -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); }