1
0
Fork 0

EEPROM: Don't erase if we don't have to. Adding eeprom_driver_format abstraction. (#18332)

This commit is contained in:
Purdea Andrei 2024-05-28 14:49:55 +03:00 committed by GitHub
parent 6921c8a7dd
commit 267dffda15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 63 additions and 4 deletions

View file

@ -77,3 +77,9 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) {
eeprom_write_dword(addr, value);
}
}
void eeprom_driver_format(bool erase) __attribute__((weak));
void eeprom_driver_format(bool erase) {
(void)erase; /* The default implementation assumes that the eeprom must be erased in order to be usable. */
eeprom_driver_erase();
}