diff options
Diffstat (limited to 'tmk_core/common/eeconfig.c')
-rw-r--r-- | tmk_core/common/eeconfig.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 3c26b8f613..8ae4c30519 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -15,7 +15,10 @@ # include "eeprom_driver.h" #endif -extern layer_state_t default_layer_state; +#if defined(HAPTIC_ENABLE) +# include "haptic.h" +#endif + /** \brief eeconfig enable * * FIXME: needs doc @@ -70,6 +73,16 @@ void eeconfig_init_quantum(void) { #ifdef ORYX_ENABLE eeconfig_init_oryx(); #endif + +#if defined(HAPTIC_ENABLE) + haptic_reset(); +#else + // this is used in case haptic is disabled, but we still want sane defaults + // in the haptic configuration eeprom. All zero will trigger a haptic_reset + // when a haptic-enabled firmware is loaded onto the keyboard. + eeprom_update_dword(EECONFIG_HAPTIC, 0); +#endif + eeconfig_init_kb(); } |