Browse Source

Wrangle HAL EEPROM types

Scott Lahteine 5 years ago
parent
commit
0fec478562

Marlin/src/HAL/ESP32/eeprom_impl.cpp → Marlin/src/HAL/ESP32/eeprom.cpp View File


Marlin/src/HAL/LINUX/eeprom_impl.cpp → Marlin/src/HAL/LINUX/eeprom.cpp View File


+ 1
- 1
Marlin/src/HAL/SAMD51/inc/Conditionals_post.h View File

21
  */
21
  */
22
 #pragma once
22
 #pragma once
23
 
23
 
24
-#if USE_FALLBACK_EEPROM && NONE(SDCARD_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
24
+#if USE_FALLBACK_EEPROM
25
   #define FLASH_EEPROM_EMULATION
25
   #define FLASH_EEPROM_EMULATION
26
 #endif
26
 #endif

Marlin/src/HAL/STM32/eeprom_impl.cpp → Marlin/src/HAL/STM32/eeprom_wired.cpp View File


Marlin/src/HAL/STM32F1/eeprom.cpp → Marlin/src/HAL/STM32F1/eeprom_wired.cpp View File


Marlin/src/HAL/TEENSY31_32/eeprom_impl.cpp → Marlin/src/HAL/TEENSY31_32/eeprom.cpp View File

20
 
20
 
21
 #include "../../inc/MarlinConfig.h"
21
 #include "../../inc/MarlinConfig.h"
22
 
22
 
23
-#if ENABLED(EEPROM_SETTINGS)
23
+#if USE_WIRED_EEPROM
24
 
24
 
25
 #include "../shared/eeprom_api.h"
25
 #include "../shared/eeprom_api.h"
26
 
26
 
58
   return false;
58
   return false;
59
 }
59
 }
60
 
60
 
61
-#endif // EEPROM_SETTINGS
61
+#endif // USE_WIRED_EEPROM
62
 #endif // __MK20DX256__
62
 #endif // __MK20DX256__

+ 2
- 3
Marlin/src/HAL/TEENSY31_32/inc/Conditionals_post.h View File

21
  */
21
  */
22
 #pragma once
22
 #pragma once
23
 
23
 
24
-// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
25
-#if ENABLED(EEPROM_SETTINGS) && NONE(USE_WIRED_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
26
-  #define SDCARD_EEPROM_EMULATION
24
+#if USE_FALLBACK_EEPROM
25
+  #define USE_WIRED_EEPROM 1
27
 #endif
26
 #endif

+ 2
- 2
Marlin/src/HAL/TEENSY35_36/eeprom.cpp View File

25
 
25
 
26
 #include "../../inc/MarlinConfig.h"
26
 #include "../../inc/MarlinConfig.h"
27
 
27
 
28
-#if ENABLED(EEPROM_SETTINGS)
28
+#if USE_WIRED_EEPROM
29
 
29
 
30
 #include "../shared/eeprom_api.h"
30
 #include "../shared/eeprom_api.h"
31
 #include <avr/eeprom.h>
31
 #include <avr/eeprom.h>
66
 
66
 
67
 size_t PersistentStore::capacity() { return E2END + 1; }
67
 size_t PersistentStore::capacity() { return E2END + 1; }
68
 
68
 
69
-#endif // EEPROM_SETTINGS
69
+#endif // USE_WIRED_EEPROM
70
 #endif // __MK64FX512__ || __MK66FX1M0__
70
 #endif // __MK64FX512__ || __MK66FX1M0__

+ 4
- 0
Marlin/src/HAL/TEENSY35_36/inc/Conditionals_post.h View File

20
  *
20
  *
21
  */
21
  */
22
 #pragma once
22
 #pragma once
23
+
24
+#if USE_FALLBACK_EEPROM
25
+  #define USE_WIRED_EEPROM 1
26
+#endif

+ 3
- 1
Marlin/src/inc/Conditionals_post.h View File

39
 #if ENABLED(EEPROM_SETTINGS)
39
 #if ENABLED(EEPROM_SETTINGS)
40
   // EEPROM type may be defined by compile flags, configs, HALs, or pins
40
   // EEPROM type may be defined by compile flags, configs, HALs, or pins
41
   // Set additional flags to let HALs choose in their Conditionals_post.h
41
   // Set additional flags to let HALs choose in their Conditionals_post.h
42
-  #if NONE(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) && ANY(I2C_EEPROM, SPI_EEPROM, QSPI_EEPROM)
42
+  #if ANY(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION)
43
+    #define USE_EMULATED_EEPROM 1
44
+  #elif ANY(I2C_EEPROM, SPI_EEPROM, QSPI_EEPROM)
43
     #define USE_WIRED_EEPROM    1
45
     #define USE_WIRED_EEPROM    1
44
   #else
46
   #else
45
     #define USE_FALLBACK_EEPROM 1
47
     #define USE_FALLBACK_EEPROM 1

Loading…
Cancel
Save