Add EEPROM flush function to clear address contents

This commit is contained in:
2025-10-04 14:37:38 +02:00
parent c24e032981
commit 443c62593d
+10
View File
@@ -23,3 +23,13 @@ void eepromWrite(uint8_t address, uint8_t data) {
EECR |= (1 << EEPE);
}
}
void eepromFlush(uint8_t address) {
if (eepromRead(address) != 0) {
EEAR = address;
EEDR = 0;
EECR |= (1 << EEMPE);
EECR |= (1 << EEPE);
}
}