Fix compile error with SD_FIRMWARE_UPDATE (#12462)
This commit is contained in:
parent
779b2709ec
commit
22d7fed60a
5 changed files with 10 additions and 7 deletions
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(EEPROM_SETTINGS)
|
#if ENABLED(EEPROM_SETTINGS) || ENABLED(SD_FIRMWARE_UPDATE)
|
||||||
|
|
||||||
#include "../shared/persistent_store_api.h"
|
#include "../shared/persistent_store_api.h"
|
||||||
|
|
||||||
|
@ -64,5 +64,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
|
||||||
|
|
||||||
size_t PersistentStore::capacity() { return E2END + 1; }
|
size_t PersistentStore::capacity() { return E2END + 1; }
|
||||||
|
|
||||||
#endif // EEPROM_SETTINGS
|
#endif // EEPROM_SETTINGS || SD_FIRMWARE_UPDATE
|
||||||
#endif // __AVR__
|
#endif // __AVR__
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
*/
|
*/
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#if ENABLED(EEPROM_SETTINGS)
|
#if ENABLED(EEPROM_SETTINGS) || ENABLED(SD_FIRMWARE_UPDATE)
|
||||||
|
|
||||||
#include "persistent_store_api.h"
|
#include "persistent_store_api.h"
|
||||||
PersistentStore persistentStore;
|
PersistentStore persistentStore;
|
||||||
|
|
|
@ -35,7 +35,7 @@ void safe_delay(millis_t ms) {
|
||||||
thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made
|
thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(EEPROM_SETTINGS)
|
#if ENABLED(EEPROM_SETTINGS) || ENABLED(SD_FIRMWARE_UPDATE)
|
||||||
|
|
||||||
void crc16(uint16_t *crc, const void * const data, uint16_t cnt) {
|
void crc16(uint16_t *crc, const void * const data, uint16_t cnt) {
|
||||||
uint8_t *ptr = (uint8_t *)data;
|
uint8_t *ptr = (uint8_t *)data;
|
||||||
|
@ -46,7 +46,7 @@ void safe_delay(millis_t ms) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // EEPROM_SETTINGS
|
#endif // EEPROM_SETTINGS || SD_FIRMWARE_UPDATE
|
||||||
|
|
||||||
#if ENABLED(ULTRA_LCD) || ENABLED(DEBUG_LEVELING_FEATURE) || ENABLED(EXTENSIBLE_UI)
|
#if ENABLED(ULTRA_LCD) || ENABLED(DEBUG_LEVELING_FEATURE) || ENABLED(EXTENSIBLE_UI)
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ constexpr char axis_codes[XYZE] = { 'X', 'Y', 'Z', 'E' };
|
||||||
|
|
||||||
void safe_delay(millis_t ms);
|
void safe_delay(millis_t ms);
|
||||||
|
|
||||||
#if ENABLED(EEPROM_SETTINGS)
|
#if ENABLED(EEPROM_SETTINGS) || ENABLED(SD_FIRMWARE_UPDATE)
|
||||||
void crc16(uint16_t *crc, const void * const data, uint16_t cnt);
|
void crc16(uint16_t *crc, const void * const data, uint16_t cnt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,10 @@
|
||||||
#include "../gcode/gcode.h"
|
#include "../gcode/gcode.h"
|
||||||
#include "../Marlin.h"
|
#include "../Marlin.h"
|
||||||
|
|
||||||
|
#if ENABLED(EEPROM_SETTINGS) || ENABLED(SD_FIRMWARE_UPDATE)
|
||||||
|
#include "../HAL/shared/persistent_store_api.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAS_LEVELING
|
#if HAS_LEVELING
|
||||||
#include "../feature/bedlevel/bedlevel.h"
|
#include "../feature/bedlevel/bedlevel.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -381,7 +385,6 @@ void MarlinSettings::postprocess() {
|
||||||
#endif // SD_FIRMWARE_UPDATE
|
#endif // SD_FIRMWARE_UPDATE
|
||||||
|
|
||||||
#if ENABLED(EEPROM_SETTINGS)
|
#if ENABLED(EEPROM_SETTINGS)
|
||||||
#include "../HAL/shared/persistent_store_api.h"
|
|
||||||
|
|
||||||
#define EEPROM_START() int eeprom_index = EEPROM_OFFSET; persistentStore.access_start()
|
#define EEPROM_START() int eeprom_index = EEPROM_OFFSET; persistentStore.access_start()
|
||||||
#define EEPROM_FINISH() persistentStore.access_finish()
|
#define EEPROM_FINISH() persistentStore.access_finish()
|
||||||
|
|
Reference in a new issue