aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/common/eeconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/eeconfig.c')
-rw-r--r--tmk_core/common/eeconfig.c10
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);
}