Merge pull request #13579 from s-hadinger/ezsp32_wire

EZSP32 prevent crash on IDF4.4
This commit is contained in:
s-hadinger 2021-11-05 18:56:22 +01:00 committed by GitHub
commit 4e4206af30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -108,11 +108,13 @@ void ZigbeeInit(void)
#ifdef USE_ZIGBEE_EZSP
// Check the I2C EEprom
Wire.beginTransmission(USE_ZIGBEE_ZBBRIDGE_EEPROM);
uint8_t error = Wire.endTransmission();
if (0 == error) {
AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS " 0x%02X"), USE_ZIGBEE_ZBBRIDGE_EEPROM);
zigbee.eeprom_present = true;
if (TasmotaGlobal.i2c_enabled) {
Wire.beginTransmission(USE_ZIGBEE_ZBBRIDGE_EEPROM);
uint8_t error = Wire.endTransmission();
if (0 == error) {
AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS " 0x%02X"), USE_ZIGBEE_ZBBRIDGE_EEPROM);
zigbee.eeprom_present = true;
}
}
#endif
}