diff --git a/Marlin/src/HAL/ESP32/eeprom_impl.cpp b/Marlin/src/HAL/ESP32/eeprom.cpp similarity index 100% rename from Marlin/src/HAL/ESP32/eeprom_impl.cpp rename to Marlin/src/HAL/ESP32/eeprom.cpp diff --git a/Marlin/src/HAL/LINUX/eeprom_impl.cpp b/Marlin/src/HAL/LINUX/eeprom.cpp similarity index 100% rename from Marlin/src/HAL/LINUX/eeprom_impl.cpp rename to Marlin/src/HAL/LINUX/eeprom.cpp diff --git a/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h b/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h index 490cfd50e8..24ff12cf19 100644 --- a/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h +++ b/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h @@ -21,6 +21,6 @@ */ #pragma once -#if USE_FALLBACK_EEPROM && NONE(SDCARD_EEPROM_EMULATION, SRAM_EEPROM_EMULATION) +#if USE_FALLBACK_EEPROM #define FLASH_EEPROM_EMULATION #endif diff --git a/Marlin/src/HAL/STM32/eeprom_impl.cpp b/Marlin/src/HAL/STM32/eeprom_wired.cpp similarity index 100% rename from Marlin/src/HAL/STM32/eeprom_impl.cpp rename to Marlin/src/HAL/STM32/eeprom_wired.cpp diff --git a/Marlin/src/HAL/STM32F1/eeprom.cpp b/Marlin/src/HAL/STM32F1/eeprom_wired.cpp similarity index 100% rename from Marlin/src/HAL/STM32F1/eeprom.cpp rename to Marlin/src/HAL/STM32F1/eeprom_wired.cpp diff --git a/Marlin/src/HAL/TEENSY31_32/eeprom_impl.cpp b/Marlin/src/HAL/TEENSY31_32/eeprom.cpp similarity index 97% rename from Marlin/src/HAL/TEENSY31_32/eeprom_impl.cpp rename to Marlin/src/HAL/TEENSY31_32/eeprom.cpp index 96499d4f19..a00c1062aa 100644 --- a/Marlin/src/HAL/TEENSY31_32/eeprom_impl.cpp +++ b/Marlin/src/HAL/TEENSY31_32/eeprom.cpp @@ -20,7 +20,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(EEPROM_SETTINGS) +#if USE_WIRED_EEPROM #include "../shared/eeprom_api.h" @@ -58,5 +58,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t return false; } -#endif // EEPROM_SETTINGS +#endif // USE_WIRED_EEPROM #endif // __MK20DX256__ diff --git a/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_post.h b/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_post.h index 11603c9ef4..fb93947fd2 100644 --- a/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_post.h +++ b/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_post.h @@ -21,7 +21,6 @@ */ #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 +#if USE_FALLBACK_EEPROM + #define USE_WIRED_EEPROM 1 #endif diff --git a/Marlin/src/HAL/TEENSY35_36/eeprom.cpp b/Marlin/src/HAL/TEENSY35_36/eeprom.cpp index c66a45e2a5..0ee686de13 100644 --- a/Marlin/src/HAL/TEENSY35_36/eeprom.cpp +++ b/Marlin/src/HAL/TEENSY35_36/eeprom.cpp @@ -25,7 +25,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(EEPROM_SETTINGS) +#if USE_WIRED_EEPROM #include "../shared/eeprom_api.h" #include @@ -66,5 +66,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t size_t PersistentStore::capacity() { return E2END + 1; } -#endif // EEPROM_SETTINGS +#endif // USE_WIRED_EEPROM #endif // __MK64FX512__ || __MK66FX1M0__ diff --git a/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_post.h b/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_post.h index 0285c52ee3..fb93947fd2 100644 --- a/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_post.h +++ b/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_post.h @@ -20,3 +20,7 @@ * */ #pragma once + +#if USE_FALLBACK_EEPROM + #define USE_WIRED_EEPROM 1 +#endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index ac4de5df10..e8279475c7 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -39,7 +39,9 @@ #if ENABLED(EEPROM_SETTINGS) // EEPROM type may be defined by compile flags, configs, HALs, or pins // Set additional flags to let HALs choose in their Conditionals_post.h - #if NONE(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) && ANY(I2C_EEPROM, SPI_EEPROM, QSPI_EEPROM) + #if ANY(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) + #define USE_EMULATED_EEPROM 1 + #elif ANY(I2C_EEPROM, SPI_EEPROM, QSPI_EEPROM) #define USE_WIRED_EEPROM 1 #else #define USE_FALLBACK_EEPROM 1