|
@ -167,10 +167,6 @@ void _settingsFactoryResetCommand() { |
|
|
EEPROMr.commit(); |
|
|
EEPROMr.commit(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void _settingsDumpCommand() { |
|
|
|
|
|
EEPROMr.dump(_serial); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void _settingsInitCommands() { |
|
|
void _settingsInitCommands() { |
|
|
|
|
|
|
|
|
#if DEBUG_SUPPORT
|
|
|
#if DEBUG_SUPPORT
|
|
@ -186,11 +182,6 @@ void _settingsInitCommands() { |
|
|
DEBUG_MSG_P(PSTR("+OK\n")); |
|
|
DEBUG_MSG_P(PSTR("+OK\n")); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
settingsRegisterCommand(F("EEPROM.DUMP"), [](Embedis* e) { |
|
|
|
|
|
_settingsDumpCommand(); |
|
|
|
|
|
DEBUG_MSG_P(PSTR("\n+OK\n")); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
settingsRegisterCommand(F("ERASE.CONFIG"), [](Embedis* e) { |
|
|
settingsRegisterCommand(F("ERASE.CONFIG"), [](Embedis* e) { |
|
|
DEBUG_MSG_P(PSTR("+OK\n")); |
|
|
DEBUG_MSG_P(PSTR("+OK\n")); |
|
|
resetReason(CUSTOM_RESET_TERMINAL); |
|
|
resetReason(CUSTOM_RESET_TERMINAL); |
|
@ -343,6 +334,10 @@ void settingsInject(void *data, size_t len) { |
|
|
_serial.inject((char *) data, len); |
|
|
_serial.inject((char *) data, len); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Stream & settingsSerial() { |
|
|
|
|
|
return (Stream &) _serial; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
size_t settingsMaxSize() { |
|
|
size_t settingsMaxSize() { |
|
|
size_t size = EEPROM_SIZE; |
|
|
size_t size = EEPROM_SIZE; |
|
|
if (size > SPI_FLASH_SEC_SIZE) size = SPI_FLASH_SEC_SIZE; |
|
|
if (size > SPI_FLASH_SEC_SIZE) size = SPI_FLASH_SEC_SIZE; |
|
|