summaryrefslogtreecommitdiff
path: root/common/keyboard.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-03-11 15:10:56 +0900
committertmk <nobody@nowhere>2013-03-11 15:10:56 +0900
commitd055e0633e36e97802d60554f6002e47021ba5fd (patch)
treed129174dd33232723fbd60795ccb5132701ad51f /common/keyboard.c
parent1d5bbb55f28eb2e9eff0543753b8cb85f3b94282 (diff)
Fix debug parameter setting in eeconfig
Diffstat (limited to 'common/keyboard.c')
-rw-r--r--common/keyboard.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/common/keyboard.c b/common/keyboard.c
index 0a0bacd433..1acb79861d 100644
--- a/common/keyboard.c
+++ b/common/keyboard.c
@@ -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();
}