From 8b3eea922b45408a1215c8496b1c93b61ee0513d Mon Sep 17 00:00:00 2001 From: Pawel Jalocha Date: Wed, 23 Jan 2019 16:09:30 +0000 Subject: [PATCH] Do not start I2C, unless needed for pressure sensor or OLED --- main/hal.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/hal.cpp b/main/hal.cpp index 7193cea..abe5213 100644 --- a/main/hal.cpp +++ b/main/hal.cpp @@ -270,6 +270,11 @@ uint8_t BARO_I2C = (uint8_t)I2C_BUS; #define PIN_BEEPER GPIO_NUM_17 #endif +#if !defined(WITH_OLED) && !defined(WITH_BMP180) && !defined(WITH_BMP280) && !defined(WITH_BME280) +#undef PIN_I2C_SCL +#undef PIN_I2C_SDA +#endif + // ====================================================================================================== // 48-bit unique ID of the chip