diff --git a/src/detect/i2cScan.h b/src/detect/i2cScan.h index 69fc1a8a8..1148495ba 100644 --- a/src/detect/i2cScan.h +++ b/src/detect/i2cScan.h @@ -12,6 +12,7 @@ void printATECCInfo() { +#ifndef ARCH_PORTDUINO atecc.readConfigZone(false); DEBUG_MSG("ATECC608B Serial Number: "); @@ -40,6 +41,7 @@ void printATECCInfo() DEBUG_MSG("\n"); } } +#endif } uint16_t getRegisterValue(uint8_t address, uint8_t reg, uint8_t length) { @@ -112,6 +114,7 @@ void scanI2Cdevice(void) DEBUG_MSG("unknown display found\n"); } } +#ifndef ARCH_PORTDUINO if (addr == ATECC608B_ADDR){ keystore_found = addr; if (atecc.begin(keystore_found) == true) { @@ -121,6 +124,7 @@ void scanI2Cdevice(void) } printATECCInfo(); } +#endif #ifdef RV3028_RTC if (addr == RV3028_RTC){ rtc_found = addr; diff --git a/src/main.cpp b/src/main.cpp index a17de7eca..8779a6ab0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -82,7 +82,9 @@ uint8_t rtc_found; // Keystore Chips uint8_t keystore_found; +#ifndef ARCH_PORTDUINO ATECCX08A atecc; +#endif bool eink_found = true; diff --git a/src/main.h b/src/main.h index f0f18a943..3744c8acd 100644 --- a/src/main.h +++ b/src/main.h @@ -6,7 +6,9 @@ #include "PowerStatus.h" #include "graphics/Screen.h" #include "mesh/generated/telemetry.pb.h" +#ifndef ARCH_PORTDUINO #include +#endif extern uint8_t screen_found; extern uint8_t screen_model; @@ -20,7 +22,9 @@ extern bool pmu_found; extern bool isCharging; extern bool isUSBPowered; +#ifndef ARCH_PORTDUINO extern ATECCX08A atecc; +#endif extern uint8_t nodeTelemetrySensorsMap[TelemetrySensorType_QMI8658+1];