Only write to file if value has actually changed.
This commit is contained in:
parent
2c3df24fc1
commit
f5fc086177
1 changed files with 7 additions and 0 deletions
|
@ -23,6 +23,13 @@ uint8_t EEPROMClass::read( int idx )
|
|||
void EEPROMClass::write( int idx, uint8_t val )
|
||||
{
|
||||
printf("Writing to EEPROM address %u = %u\n", idx, val);
|
||||
|
||||
if(val == someFakeEEPROM_memory[idx])
|
||||
{
|
||||
//Value unchanged, do nothing.
|
||||
return;
|
||||
}
|
||||
|
||||
someFakeEEPROM_memory[idx] = val;
|
||||
|
||||
if(autoUpdate && storage)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue