Return 'false' on EEPROM connection fail (#14776)
This commit is contained in:
parent
128eed6b57
commit
fdbc733376
1 changed files with 3 additions and 2 deletions
|
@ -460,7 +460,8 @@ void MarlinSettings::postprocess() {
|
|||
#define EEPROM_SKIP(VAR) (eeprom_index += sizeof(VAR))
|
||||
#endif
|
||||
|
||||
#define EEPROM_START() int eeprom_index = EEPROM_OFFSET; persistentStore.access_start()
|
||||
#define EEPROM_START() if (!persistentStore.access_start()) { SERIAL_ECHO_MSG("No EEPROM."); return false; } \
|
||||
int eeprom_index = EEPROM_OFFSET
|
||||
#define EEPROM_FINISH() persistentStore.access_finish()
|
||||
#define EEPROM_WRITE(VAR) do{ persistentStore.write_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc); UPDATE_TEST_INDEX(VAR); }while(0)
|
||||
#define EEPROM_READ(VAR) do{ persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc, !validating); UPDATE_TEST_INDEX(VAR); }while(0)
|
||||
|
@ -2111,7 +2112,7 @@ void MarlinSettings::postprocess() {
|
|||
(void)save();
|
||||
SERIAL_ECHO_MSG("EEPROM Initialized");
|
||||
#endif
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
|
|
Reference in a new issue