소스 검색

EEPROM_EMULATED_WITH_SRAM => SRAM_EEPROM_EMULATION

Scott Lahteine 5 년 전
부모
커밋
01e8813286

+ 3
- 3
Marlin/src/HAL/HAL_STM32/HAL.cpp 파일 보기

@@ -28,13 +28,13 @@
28 28
 #include "../../inc/MarlinConfig.h"
29 29
 #include "../shared/Delay.h"
30 30
 
31
-#if ENABLED(EEPROM_EMULATED_WITH_SRAM)
31
+#if ENABLED(SRAM_EEPROM_EMULATION)
32 32
   #if STM32F7xx
33 33
     #include "stm32f7xx_ll_pwr.h"
34 34
   #elif STM32F4xx
35 35
     #include "stm32f4xx_ll_pwr.h"
36 36
   #else
37
-    #error "EEPROM_EMULATED_WITH_SRAM is currently only supported for STM32F4xx and STM32F7xx"
37
+    #error "SRAM_EEPROM_EMULATION is currently only supported for STM32F4xx and STM32F7xx"
38 38
   #endif
39 39
 #endif
40 40
 
@@ -100,7 +100,7 @@ void HAL_init(void) {
100 100
     OUT_WRITE(LED_PIN, LOW);
101 101
   #endif
102 102
 
103
-  #if ENABLED(EEPROM_EMULATED_WITH_SRAM)
103
+  #if ENABLED(SRAM_EEPROM_EMULATION)
104 104
   // Enable access to backup SRAM
105 105
   __HAL_RCC_PWR_CLK_ENABLE();
106 106
   HAL_PWR_EnableBkUpAccess();

+ 7
- 7
Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp 파일 보기

@@ -28,20 +28,20 @@
28 28
 
29 29
 #include "../shared/persistent_store_api.h"
30 30
 
31
-#if NONE(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
31
+#if NONE(SRAM_EEPROM_EMULATION, SPI_EEPROM, I2C_EEPROM)
32 32
   #include <EEPROM.h>
33 33
   static bool eeprom_data_written = false;
34 34
 #endif
35 35
 
36 36
 bool PersistentStore::access_start() {
37
-  #if NONE(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
37
+  #if NONE(SRAM_EEPROM_EMULATION, SPI_EEPROM, I2C_EEPROM)
38 38
     eeprom_buffer_fill();
39 39
   #endif
40 40
   return true;
41 41
 }
42 42
 
43 43
 bool PersistentStore::access_finish() {
44
-  #if NONE(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
44
+  #if NONE(SRAM_EEPROM_EMULATION, SPI_EEPROM, I2C_EEPROM)
45 45
     if (eeprom_data_written) {
46 46
       eeprom_buffer_flush();
47 47
       eeprom_data_written = false;
@@ -66,7 +66,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
66 66
           return true;
67 67
         }
68 68
       }
69
-    #elif DISABLED(EEPROM_EMULATED_WITH_SRAM)
69
+    #elif DISABLED(SRAM_EEPROM_EMULATION)
70 70
       eeprom_buffered_write_byte(pos, v);
71 71
     #else
72 72
       *(__IO uint8_t *)(BKPSRAM_BASE + (uint8_t * const)pos) = v;
@@ -76,7 +76,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
76 76
     pos++;
77 77
     value++;
78 78
   };
79
-  #if NONE(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
79
+  #if NONE(SRAM_EEPROM_EMULATION, SPI_EEPROM, I2C_EEPROM)
80 80
     eeprom_data_written = true;
81 81
   #endif
82 82
 
@@ -89,7 +89,7 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
89 89
     const uint8_t c = (
90 90
       #if EITHER(SPI_EEPROM, I2C_EEPROM)
91 91
         eeprom_read_byte((uint8_t*)pos)
92
-      #elif DISABLED(EEPROM_EMULATED_WITH_SRAM)
92
+      #elif DISABLED(SRAM_EEPROM_EMULATION)
93 93
         eeprom_buffered_read_byte(pos)
94 94
       #else
95 95
         (*(__IO uint8_t *)(BKPSRAM_BASE + ((uint8_t*)pos)))
@@ -107,7 +107,7 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
107 107
 size_t PersistentStore::capacity() {
108 108
   #if EITHER(SPI_EEPROM, I2C_EEPROM)
109 109
     return E2END + 1;
110
-  #elif DISABLED(EEPROM_EMULATED_WITH_SRAM)
110
+  #elif DISABLED(SRAM_EEPROM_EMULATION)
111 111
     return E2END + 1;
112 112
   #else
113 113
     return 4096; // 4kB

+ 1
- 1
Marlin/src/pins/pins_BIGTREE_SKR_PRO_V1.1.h 파일 보기

@@ -31,7 +31,7 @@
31 31
 
32 32
 #define BOARD_NAME "BIGTREE SKR Pro V1.1"
33 33
 
34
-#define EEPROM_EMULATED_WITH_SRAM
34
+#define SRAM_EEPROM_EMULATION
35 35
 
36 36
 //
37 37
 // Servos

+ 1
- 1
Marlin/src/pins/pins_BLACK_STM32F407VE.h 파일 보기

@@ -41,7 +41,7 @@
41 41
 
42 42
 //#define I2C_EEPROM
43 43
 //#define E2END 0x1FFF // EEPROM end address (8kB)
44
-#define EEPROM_EMULATED_WITH_SRAM
44
+#define SRAM_EEPROM_EMULATION
45 45
 
46 46
 #if HOTENDS > 2 || E_STEPPERS > 2
47 47
   #error "Black STM32F4VET6 supports up to 2 hotends / E-steppers."

Loading…
취소
저장