From f263782f1b1fa981c292f6cdeea8e00bc6f73df3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 1 Apr 2020 23:50:32 -0500 Subject: [PATCH] Fix ESP32 eeprom flag --- Marlin/src/HAL/ESP32/eeprom_impl.cpp | 4 ++-- Marlin/src/HAL/ESP32/inc/Conditionals_post.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/HAL/ESP32/eeprom_impl.cpp b/Marlin/src/HAL/ESP32/eeprom_impl.cpp index f36aabf28e..1c005ff3d4 100644 --- a/Marlin/src/HAL/ESP32/eeprom_impl.cpp +++ b/Marlin/src/HAL/ESP32/eeprom_impl.cpp @@ -24,7 +24,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(EEPROM_SETTINGS) && DISABLED(FLASH_EEPROM_EMULATION) +#if USE_WIRED_EEPROM #include "../shared/eeprom_api.h" #include @@ -59,5 +59,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t size_t PersistentStore::capacity() { return EEPROM_SIZE; } -#endif // EEPROM_SETTINGS +#endif // USE_WIRED_EEPROM #endif // ARDUINO_ARCH_ESP32 diff --git a/Marlin/src/HAL/ESP32/inc/Conditionals_post.h b/Marlin/src/HAL/ESP32/inc/Conditionals_post.h index 11603c9ef4..8849c06e93 100644 --- a/Marlin/src/HAL/ESP32/inc/Conditionals_post.h +++ b/Marlin/src/HAL/ESP32/inc/Conditionals_post.h @@ -21,7 +21,7 @@ */ #pragma once -// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation -#if ENABLED(EEPROM_SETTINGS) && NONE(USE_WIRED_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION) - #define SDCARD_EEPROM_EMULATION +#undef USE_WIRED_EEPROM +#if ENABLED(EEPROM_SETTINGS) && DISABLED(FLASH_EEPROM_EMULATION) + #define USE_WIRED_EEPROM 1 #endif