1
0
Fork 0

Fix debug parameter setting in eeconfig

This commit is contained in:
tmk 2013-03-11 15:10:56 +09:00
parent 1d5bbb55f2
commit d055e0633e
5 changed files with 31 additions and 12 deletions

View file

@ -66,13 +66,14 @@ void keyboard_init(void)
bootmagic();
if (eeconfig_initialized()) {
if (eeconfig_is_enabled()) {
uint8_t config;
config = eeconfig_read_debug();
debug_enable = (config & EECONFIG_DEBUG_ENABLE);
debug_matrix = (config & EECONFIG_DEBUG_MATRIX);
debug_keyboard = (config & EECONFIG_DEBUG_KEYBOARD);
debug_mouse = (config & EECONFIG_DEBUG_MOUSE);
// ignored if debug is enabled by program before.
if (!debug_enable) debug_enable = (config & EECONFIG_DEBUG_ENABLE);
if (!debug_matrix) debug_matrix = (config & EECONFIG_DEBUG_MATRIX);
if (!debug_keyboard) debug_keyboard = (config & EECONFIG_DEBUG_KEYBOARD);
if (!debug_mouse) debug_mouse = (config & EECONFIG_DEBUG_MOUSE);
} else {
eeconfig_init();
}