From 13bb1175f3d9e978093b88a1b5a75855fbc76641 Mon Sep 17 00:00:00 2001 From: travis-farmer Date: Tue, 31 Oct 2023 09:47:29 -0400 Subject: [PATCH] added external EEPROM support --- EEStore.cpp | 4 ++-- EEStore.h | 2 +- defines.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/EEStore.cpp b/EEStore.cpp index 57def0f..6c864eb 100644 --- a/EEStore.cpp +++ b/EEStore.cpp @@ -31,12 +31,12 @@ #include "Sensors.h" #include "Turnouts.h" -#if defined(ARDUINO_ARCH_SAMC) +#if defined(ARDUINO_ARCH_SAMC) || defined(ARDUINO_GIGA) ExternalEEPROM EEPROM; #endif void EEStore::init() { -#if defined(ARDUINO_ARCH_SAMC) +#if defined(ARDUINO_ARCH_SAMC) || defined(ARDUINO_GIGA) EEPROM.begin(0x50); // Address for Microchip 24-series EEPROM with all three // A pins grounded (0b1010000 = 0x50) #endif diff --git a/EEStore.h b/EEStore.h index 360cc9c..a8b9522 100644 --- a/EEStore.h +++ b/EEStore.h @@ -26,7 +26,7 @@ #include -#if defined(ARDUINO_ARCH_SAMC) +#if defined(ARDUINO_ARCH_SAMC) || defined(ARDUINO_GIGA) #include extern ExternalEEPROM EEPROM; #else diff --git a/defines.h b/defines.h index e530b03..a8499d6 100644 --- a/defines.h +++ b/defines.h @@ -150,7 +150,7 @@ // #endif #elif defined(ARDUINO_GIGA) #define ARDUINO_TYPE "Giga" - #ifndef DISABLE_EEPROM + #ifndef GIGA_EXT_EEPROM #define DISABLE_EEPROM #endif //#if !defined(I2C_USE_WIRE)