EEPROM: Don't erase if we don't have to. Adding eeprom_driver_format abstraction. (#18332)
This commit is contained in:
parent
6921c8a7dd
commit
267dffda15
10 changed files with 63 additions and 4 deletions
|
@ -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 */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue