From 66da6f4d64c971f8775ed80bc14022fd76240922 Mon Sep 17 00:00:00 2001 From: tmk Date: Sun, 26 Nov 2023 13:43:33 +0900 Subject: [PATCH] core: Fix bootmagic for NKRO --- tmk_core/common/avr/eeconfig.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tmk_core/common/avr/eeconfig.c b/tmk_core/common/avr/eeconfig.c index 5bd47dc6..726b055e 100644 --- a/tmk_core/common/avr/eeconfig.c +++ b/tmk_core/common/avr/eeconfig.c @@ -2,13 +2,18 @@ #include #include #include "eeconfig.h" +#include "keymap.h" void eeconfig_init(void) { eeprom_write_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); eeprom_write_byte(EECONFIG_DEBUG, 0); eeprom_write_byte(EECONFIG_DEFAULT_LAYER, 0); +#if defined(NKRO_ENABLE) || defined(NKRO_6KRO_ENABLE) + eeprom_write_byte(EECONFIG_KEYMAP, ((keymap_config_t) { .nkro = 1 }).raw); +#else eeprom_write_byte(EECONFIG_KEYMAP, 0); +#endif eeprom_write_byte(EECONFIG_MOUSEKEY_ACCEL, 0); #ifdef BACKLIGHT_ENABLE eeprom_write_byte(EECONFIG_BACKLIGHT, 0);