diff options
Diffstat (limited to 'tmk_core/common/eeconfig.c')
-rw-r--r-- | tmk_core/common/eeconfig.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 39628475f6..71de5da0cf 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -39,7 +39,8 @@ void eeconfig_init_quantum(void) { eeprom_update_byte(EECONFIG_DEBUG, 0); eeprom_update_byte(EECONFIG_DEFAULT_LAYER, 0); default_layer_state = 0; - eeprom_update_byte(EECONFIG_KEYMAP, 0); + eeprom_update_byte(EECONFIG_KEYMAP_LOWER_BYTE, 0); + eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, 0); eeprom_update_byte(EECONFIG_MOUSEKEY_ACCEL, 0); eeprom_update_byte(EECONFIG_BACKLIGHT, 0); eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default @@ -127,12 +128,17 @@ void eeconfig_update_default_layer(uint8_t val) { eeprom_update_byte(EECONFIG_DE * * FIXME: needs doc */ -uint8_t eeconfig_read_keymap(void) { return eeprom_read_byte(EECONFIG_KEYMAP); } +uint16_t eeconfig_read_keymap(void) { + return ( eeprom_read_byte(EECONFIG_KEYMAP_LOWER_BYTE) | (eeprom_read_byte(EECONFIG_KEYMAP_UPPER_BYTE) << 8) ); +} /** \brief eeconfig update keymap * * FIXME: needs doc */ -void eeconfig_update_keymap(uint8_t val) { eeprom_update_byte(EECONFIG_KEYMAP, val); } +void eeconfig_update_keymap(uint16_t val) { + eeprom_update_byte(EECONFIG_KEYMAP_LOWER_BYTE, val & 0xFF); + eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, ( val >> 8 ) & 0xFF ); +} /** \brief eeconfig read backlight * |