From 753a61b431b107ce98d57abf1a0cc8a12dc5597d Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Fri, 5 Nov 2021 18:20:18 +0100 Subject: [PATCH] EZSP32 prevent crash on IDF4.4 --- tasmota/xdrv_23_zigbee_A_impl.ino | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tasmota/xdrv_23_zigbee_A_impl.ino b/tasmota/xdrv_23_zigbee_A_impl.ino index bb241d5e4..70dace713 100644 --- a/tasmota/xdrv_23_zigbee_A_impl.ino +++ b/tasmota/xdrv_23_zigbee_A_impl.ino @@ -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 }