From 2309a1c9cbbcfd1a29a1395ca06ad2af8a0d23d0 Mon Sep 17 00:00:00 2001 From: StanJ <53401742+Tech-TX@users.noreply.github.com> Date: Tue, 3 Dec 2019 11:45:58 -0600 Subject: [PATCH] removed TWI_CLOCK_STRETCH_MULTIPLIER (#6867) --- cores/esp8266/core_esp8266_si2c.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cores/esp8266/core_esp8266_si2c.cpp b/cores/esp8266/core_esp8266_si2c.cpp index 04168ccaa8..58442e4147 100644 --- a/cores/esp8266/core_esp8266_si2c.cpp +++ b/cores/esp8266/core_esp8266_si2c.cpp @@ -158,13 +158,6 @@ static Twi twi; #define FCPU80 80000000L #endif -#if F_CPU == FCPU80 -#define TWI_CLOCK_STRETCH_MULTIPLIER 3 -#else -#define TWI_CLOCK_STRETCH_MULTIPLIER 6 -#endif - - void Twi::setClock(unsigned int freq) { preferred_si2c_clock = freq; @@ -231,7 +224,7 @@ void Twi::setClock(unsigned int freq) void Twi::setClockStretchLimit(uint32_t limit) { - twi_clockStretchLimit = limit * TWI_CLOCK_STRETCH_MULTIPLIER; + twi_clockStretchLimit = limit; }