Add MarlinSettings::validate()
This commit is contained in:
@ -38,10 +38,10 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc) {
|
||||
bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) {
|
||||
do {
|
||||
uint8_t c = eeprom_read_byte((unsigned char*)pos);
|
||||
*value = c;
|
||||
if (writing) *value = c;
|
||||
crc16(crc, &c, 1);
|
||||
pos++;
|
||||
value++;
|
||||
|
Reference in New Issue
Block a user