diff options
author | Nick Brassel <nick@tzarc.org> | 2019-11-06 08:04:50 +1100 |
---|---|---|
committer | Nick Brassel <nick@tzarc.org> | 2020-01-24 12:45:58 +1100 |
commit | d13ada11622977bcc0b530212b4405229805016d (patch) | |
tree | 3f8874ac3c9b5950b1fed6ac4d0081a268d9f487 /tmk_core/common/eeconfig.c | |
parent | 6ff093efbee21d3f64f5b4bfdbc66d4648490523 (diff) | |
download | qmk_firmware-d13ada11622977bcc0b530212b4405229805016d.tar.gz |
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.
Diffstat (limited to 'tmk_core/common/eeconfig.c')
-rw-r--r-- | tmk_core/common/eeconfig.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 7cec4bd7d..fe56c57d1 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -9,6 +9,10 @@ # include "eeprom_stm32.h" #endif +#if defined(EEPROM_DRIVER) +# include "eeprom_driver.h" +#endif + /** \brief eeconfig enable * * FIXME: needs doc @@ -32,6 +36,9 @@ 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); eeprom_update_byte(EECONFIG_DEFAULT_LAYER, 0); @@ -81,6 +88,9 @@ 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); } |