|
@@ -32,6 +32,21 @@ class MarlinSettings {
|
32
|
32
|
static void reset();
|
33
|
33
|
static bool save();
|
34
|
34
|
|
|
35
|
+ FORCE_INLINE static bool init_eeprom() {
|
|
36
|
+ bool success = true;
|
|
37
|
+ reset();
|
|
38
|
+ #if ENABLED(EEPROM_SETTINGS)
|
|
39
|
+ if ((success = save())) {
|
|
40
|
+ #if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
41
|
+ success = load(); // UBL uses load() to know the end of EEPROM
|
|
42
|
+ #elif ENABLED(EEPROM_CHITCHAT)
|
|
43
|
+ report();
|
|
44
|
+ #endif
|
|
45
|
+ }
|
|
46
|
+ #endif
|
|
47
|
+ return success;
|
|
48
|
+ }
|
|
49
|
+
|
35
|
50
|
#if ENABLED(EEPROM_SETTINGS)
|
36
|
51
|
static bool load();
|
37
|
52
|
|