1
0

Change logic of resetting keymap in eeprom

This commit is contained in:
Kai Ryu 2014-04-11 12:12:03 +09:00
parent 0f31162554
commit 7cdfbab020
2 changed files with 4 additions and 8 deletions

View File

@ -7,6 +7,7 @@
#include "keymap.h"
#include "action_layer.h"
#include "eeconfig.h"
#include "keymap_in_eeprom.h"
#include "bootmagic.h"
@ -30,8 +31,10 @@ void bootmagic(void)
/* eeconfig clear */
if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EEPROM_CLEAR)) {
eeconfig_disable();
eeconfig_init();
#ifdef KEYMAP_IN_EEPROM_ENABLE
write_keymap_to_eeprom();
#endif
}
/* bootloader */

View File

@ -2,7 +2,6 @@
#include <stdbool.h>
#include <avr/eeprom.h>
#include "eeconfig.h"
#include "keymap_in_eeprom.h"
void eeconfig_init(void)
{
@ -14,9 +13,6 @@ void eeconfig_init(void)
#ifdef BACKLIGHT_ENABLE
eeprom_write_byte(EECONFIG_BACKLIGHT, 0);
#endif
#ifdef KEYMAP_IN_EEPROM_ENABLE
keymap_in_eeprom_init();
#endif
}
void eeconfig_enable(void)
@ -27,9 +23,6 @@ void eeconfig_enable(void)
void eeconfig_disable(void)
{
eeprom_write_word(EECONFIG_MAGIC, 0xFFFF);
#ifdef KEYMAP_IN_EEPROM_ENABLE
keymap_in_eeprom_disable();
#endif
}
bool eeconfig_is_enabled(void)