Browse Source

Revert I2C clock and clock stretch time change

i18n
Xose Pérez 6 years ago
parent
commit
da2c104fe3
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      code/espurna/i2c.ino

+ 2
- 4
code/espurna/i2c.ino View File

@ -185,15 +185,13 @@ void i2cSetup() {
unsigned char sda = getSetting("i2cSDA", I2C_SDA_PIN).toInt(); unsigned char sda = getSetting("i2cSDA", I2C_SDA_PIN).toInt();
unsigned char scl = getSetting("i2cSCL", I2C_SCL_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 #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); brzo_i2c_setup(sda, scl, cst);
#else #else
Wire.begin(sda, scl); Wire.begin(sda, scl);
//Wire.setClock(_i2c_scl_frequency);
//Wire.setClockStretchLimit(cst);
#endif #endif
DEBUG_MSG_P(PSTR("[I2C] Using GPIO%d for SDA and GPIO%d for SCL\n"), sda, scl); DEBUG_MSG_P(PSTR("[I2C] Using GPIO%d for SDA and GPIO%d for SCL\n"), sda, scl);


Loading…
Cancel
Save