From d7c6b7139142cdba602d1781e68770ad3e16cf11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mate=CC=8Cj=20Sychra?= Date: Thu, 22 Nov 2018 13:26:22 +0100 Subject: [PATCH] clock stretch fix done right --- 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 bb7b66ed0c..549273a1ad 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++)