From da2c104fe3bed8a8000655f5ffa232aaba2f23ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sun, 14 Jan 2018 14:09:07 +0100 Subject: [PATCH] Revert I2C clock and clock stretch time change --- code/espurna/i2c.ino | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/espurna/i2c.ino b/code/espurna/i2c.ino index 8aeb79a7..422ff4c8 100644 --- a/code/espurna/i2c.ino +++ b/code/espurna/i2c.ino @@ -185,15 +185,13 @@ void i2cSetup() { unsigned char sda = getSetting("i2cSDA", I2C_SDA_PIN).toInt(); unsigned char scl = getSetting("i2cSCL", I2C_SCL_PIN).toInt(); - unsigned long cst = getSetting("i2cCST", I2C_CLOCK_STRETCH_TIME).toInt(); - _i2c_scl_frequency = getSetting("i2cFreq", I2C_SCL_FREQUENCY).toInt(); #if I2C_USE_BRZO + unsigned long cst = getSetting("i2cCST", I2C_CLOCK_STRETCH_TIME).toInt(); + _i2c_scl_frequency = getSetting("i2cFreq", I2C_SCL_FREQUENCY).toInt(); brzo_i2c_setup(sda, scl, cst); #else Wire.begin(sda, scl); - //Wire.setClock(_i2c_scl_frequency); - //Wire.setClockStretchLimit(cst); #endif DEBUG_MSG_P(PSTR("[I2C] Using GPIO%d for SDA and GPIO%d for SCL\n"), sda, scl);