Browse Source

Cleanup, comment "wired" eeproms

Scott Lahteine 4 years ago
parent
commit
3c080ee3e6

+ 5
- 0
Marlin/src/HAL/AVR/eeprom.cpp View File

@@ -25,6 +25,11 @@
25 25
 
26 26
 #if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
27 27
 
28
+/**
29
+ * PersistentStore for Arduino-style EEPROM interface
30
+ * with implementations supplied by the framework.
31
+ */
32
+
28 33
 #include "../shared/eeprom_api.h"
29 34
 
30 35
 size_t PersistentStore::capacity()    { return E2END + 1; }

+ 5
- 0
Marlin/src/HAL/DUE/eeprom_wired.cpp View File

@@ -26,6 +26,11 @@
26 26
 
27 27
 #if USE_WIRED_EEPROM
28 28
 
29
+/**
30
+ * PersistentStore for Arduino-style EEPROM interface
31
+ * with simple implementations supplied by Marlin.
32
+ */
33
+
29 34
 #include "../shared/eeprom_if.h"
30 35
 #include "../shared/eeprom_api.h"
31 36
 

+ 8
- 5
Marlin/src/HAL/LPC1768/eeprom_wired.cpp View File

@@ -25,20 +25,25 @@
25 25
 
26 26
 #if USE_WIRED_EEPROM
27 27
 
28
-#include "../shared/eeprom_if.h"
28
+/**
29
+ * PersistentStore for Arduino-style EEPROM interface
30
+ * with implementations supplied by the framework.
31
+ */
32
+
29 33
 #include "../shared/eeprom_api.h"
30 34
 
31 35
 #ifndef EEPROM_SIZE
32 36
   #define EEPROM_SIZE           0x8000 // 32kB‬
33 37
 #endif
34 38
 
39
+size_t PersistentStore::capacity()    { return EEPROM_SIZE; }
40
+bool PersistentStore::access_finish() { return true; }
41
+
35 42
 bool PersistentStore::access_start() {
36 43
   TERN_(SPI_EEPROM, eeprom_init());
37 44
   return true;
38 45
 }
39 46
 
40
-bool PersistentStore::access_finish() { return true; }
41
-
42 47
 bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
43 48
   while (size--) {
44 49
     uint8_t v = *value;
@@ -75,7 +80,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
75 80
   return false;
76 81
 }
77 82
 
78
-size_t PersistentStore::capacity() { return EEPROM_SIZE; }
79
-
80 83
 #endif // USE_WIRED_EEPROM
81 84
 #endif // TARGET_LPC1768

+ 5
- 0
Marlin/src/HAL/SAMD51/eeprom_wired.cpp View File

@@ -24,6 +24,11 @@
24 24
 
25 25
 #if USE_WIRED_EEPROM
26 26
 
27
+/**
28
+ * PersistentStore for Arduino-style EEPROM interface
29
+ * with simple implementations supplied by Marlin.
30
+ */
31
+
27 32
 #include "../shared/eeprom_if.h"
28 33
 #include "../shared/eeprom_api.h"
29 34
 

+ 8
- 1
Marlin/src/HAL/STM32/eeprom_wired.cpp View File

@@ -26,14 +26,21 @@
26 26
 
27 27
 #if USE_WIRED_EEPROM
28 28
 
29
+/**
30
+ * PersistentStore for Arduino-style EEPROM interface
31
+ * with simple implementations supplied by Marlin.
32
+ */
29 33
 
30 34
 #include "../shared/eeprom_if.h"
31 35
 #include "../shared/eeprom_api.h"
32 36
 
33 37
 size_t PersistentStore::capacity()    { return E2END + 1; }
34
-bool PersistentStore::access_start()  { return true; }
35 38
 bool PersistentStore::access_finish() { return true; }
36 39
 
40
+bool PersistentStore::access_start()  {
41
+  return true;
42
+}
43
+
37 44
 bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
38 45
   while (size--) {
39 46
     uint8_t v = *value;

+ 5
- 0
Marlin/src/HAL/STM32F1/eeprom_wired.cpp View File

@@ -23,6 +23,11 @@
23 23
 
24 24
 #if USE_WIRED_EEPROM
25 25
 
26
+/**
27
+ * PersistentStore for Arduino-style EEPROM interface
28
+ * with simple implementations supplied by Marlin.
29
+ */
30
+
26 31
 #include "../shared/eeprom_if.h"
27 32
 #include "../shared/eeprom_api.h"
28 33
 

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

@@ -24,7 +24,12 @@
24 24
 
25 25
 #include "../../inc/MarlinConfig.h"
26 26
 
27
-#if ENABLED(EEPROM_SETTINGS)
27
+#if USE_WIRED_EEPROM
28
+
29
+/**
30
+ * PersistentStore for Arduino-style EEPROM interface
31
+ * with simple implementations supplied by Marlin.
32
+ */
28 33
 
29 34
 #include "../shared/eeprom_if.h"
30 35
 #include "../shared/eeprom_api.h"
@@ -33,6 +38,10 @@ size_t PersistentStore::capacity()    { return E2END + 1; }
33 38
 bool PersistentStore::access_start()  { return true; }
34 39
 bool PersistentStore::access_finish() { return true; }
35 40
 
41
+bool PersistentStore::access_start()  {
42
+  return true;
43
+}
44
+
36 45
 bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
37 46
   while (size--) {
38 47
     uint8_t * const p = (uint8_t * const)pos;
@@ -64,5 +73,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
64 73
   return false;
65 74
 }
66 75
 
67
-#endif // EEPROM_SETTINGS
76
+#endif // USE_WIRED_EEPROM
68 77
 #endif // STM32GENERIC && (STM32F4 || STM32F7)

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

@@ -26,5 +26,4 @@
26 26
   #undef SRAM_EEPROM_EMULATION
27 27
   #undef SDCARD_EEPROM_EMULATION
28 28
   #define FLASH_EEPROM_EMULATION
29
-  #warning "Forcing use of FLASH_EEPROM_EMULATION."
30 29
 #endif

+ 5
- 0
Marlin/src/HAL/TEENSY31_32/eeprom.cpp View File

@@ -22,6 +22,11 @@
22 22
 
23 23
 #if USE_WIRED_EEPROM
24 24
 
25
+/**
26
+ * PersistentStore for Arduino-style EEPROM interface
27
+ * with implementations supplied by the framework.
28
+ */
29
+
25 30
 #include "../shared/eeprom_api.h"
26 31
 
27 32
 bool PersistentStore::access_start() { return true; }

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

@@ -26,6 +26,11 @@
26 26
 
27 27
 #if USE_WIRED_EEPROM
28 28
 
29
+/**
30
+ * PersistentStore for Arduino-style EEPROM interface
31
+ * with implementations supplied by the framework.
32
+ */
33
+
29 34
 #include "../shared/eeprom_api.h"
30 35
 #include <avr/eeprom.h>
31 36
 

Loading…
Cancel
Save