diff options
author | Purdea Andrei <[email protected]> | 2024-05-28 14:49:55 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-28 12:49:55 +0100 |
commit | 267dffda154d119ed5f155665e90fc5e03d138a5 (patch) | |
tree | 4e29634437942d5b96146fa375f1db0dc95d5105 /drivers/eeprom/eeprom_custom.c-template | |
parent | 6921c8a7ddbf5596d629f6272b4043bb3cbcf661 (diff) | |
download | qmk_firmware-267dffda154d119ed5f155665e90fc5e03d138a5.tar.gz qmk_firmware-267dffda154d119ed5f155665e90fc5e03d138a5.zip |
EEPROM: Don't erase if we don't have to. Adding eeprom_driver_format abstraction. (#18332)
Diffstat (limited to 'drivers/eeprom/eeprom_custom.c-template')
-rw-r--r-- | drivers/eeprom/eeprom_custom.c-template | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/eeprom/eeprom_custom.c-template b/drivers/eeprom/eeprom_custom.c-template index 5f915f7fab..fb1f0a3a97 100644 --- a/drivers/eeprom/eeprom_custom.c-template +++ b/drivers/eeprom/eeprom_custom.c-template @@ -23,6 +23,17 @@ void eeprom_driver_init(void) { /* Any initialisation code */ } +void eeprom_driver_format(bool erase) { + /* If erase=false, then only do the absolute minimum initialisation necessary + to make sure that the eeprom driver is usable. It doesn't need to guarantee + that the content of the eeprom is reset to any particular value. For many + eeprom drivers this may be a no-op. + + If erase=true, then in addition to making sure the eeprom driver is in a + usable state, also make sure that it is erased. + */ +} + void eeprom_driver_erase(void) { /* Wipe out the EEPROM, setting values to zero */ } |