]> git.donarmstrong.com Git - tmk_firmware.git/blobdiff - common/keyboard.c
Merge pull request #36 from Wraul/fix_sleep_led
[tmk_firmware.git] / common / keyboard.c
index 401fdb4e17f311be9bdae5d6f991f8ac4aff6bd1..6bc6fae6e25f55bf5e2b2bedb9b2c079b3a9f132 100644 (file)
@@ -54,7 +54,7 @@ static bool has_ghost_in_row(uint8_t row)
 void keyboard_init(void)
 {
     // TODO: configuration of sendchar impl
-    print_sendchar_func = sendchar;
+    print_set_sendchar(sendchar);
 
     timer_init();
     matrix_init();
@@ -64,18 +64,6 @@ void keyboard_init(void)
 
 #ifdef BOOTMAGIC_ENABLE
     bootmagic();
-
-    if (eeconfig_is_enabled()) {
-        uint8_t config;
-        config = eeconfig_read_debug();
-        // 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();
-    }
 #endif
 }
 
@@ -134,5 +122,6 @@ MATRIX_LOOP_END:
 
 void keyboard_set_leds(uint8_t leds)
 {
+    if (debug_keyboard) { debug("keyboard_set_led: "); debug_hex8(leds); debug("\n"); }
     led_set(leds);
 }