Add customisable EEPROM driver selection (#7274)
- uprintf -> dprintf - Fix atsam "vendor" eeprom. - Bump Kinetis K20x to 64 bytes, too. - Rollback Kinetis to 32 bytes as partitioning can only be done once. Add warning about changing the value. - Change RAM-backed "fake" EEPROM implementations to match eeconfig's current usage. - Add 24LC128 by request.
This commit is contained in:
parent
6ff093efbe
commit
d13ada1162
20 changed files with 616 additions and 52 deletions
|
@ -9,6 +9,10 @@
|
|||
# include "eeprom_stm32.h"
|
||||
#endif
|
||||
|
||||
#if defined(EEPROM_DRIVER)
|
||||
# include "eeprom_driver.h"
|
||||
#endif
|
||||
|
||||
/** \brief eeconfig enable
|
||||
*
|
||||
* FIXME: needs doc
|
||||
|
@ -31,6 +35,9 @@ __attribute__((weak)) void eeconfig_init_kb(void) {
|
|||
void eeconfig_init_quantum(void) {
|
||||
#ifdef STM32_EEPROM_ENABLE
|
||||
EEPROM_Erase();
|
||||
#endif
|
||||
#if defined(EEPROM_DRIVER)
|
||||
eeprom_driver_erase();
|
||||
#endif
|
||||
eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER);
|
||||
eeprom_update_byte(EECONFIG_DEBUG, 0);
|
||||
|
@ -80,6 +87,9 @@ void eeconfig_enable(void) { eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_N
|
|||
void eeconfig_disable(void) {
|
||||
#ifdef STM32_EEPROM_ENABLE
|
||||
EEPROM_Erase();
|
||||
#endif
|
||||
#if defined(EEPROM_DRIVER)
|
||||
eeprom_driver_erase();
|
||||
#endif
|
||||
eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER_OFF);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue