From aa22c07312a3f4b065a810cb91999e587b49166d Mon Sep 17 00:00:00 2001 From: Matej Sychra Date: Thu, 22 Nov 2018 17:21:21 +0100 Subject: [PATCH] clock stretch fix done right (#5363) --- cores/esp8266/core_esp8266_si2c.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cores/esp8266/core_esp8266_si2c.c b/cores/esp8266/core_esp8266_si2c.c index bb7b66ed0..549273a1a 100644 --- a/cores/esp8266/core_esp8266_si2c.c +++ b/cores/esp8266/core_esp8266_si2c.c @@ -267,6 +267,7 @@ unsigned char twi_writeTo(unsigned char address, unsigned char * buf, unsigned i SCL_LOW(); twi_delay(twi_dcount); SCL_HIGH(); + unsigned int t=0; while(SCL_READ()==0 && (t++)