X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Fkeyboard.c;h=fa22116f177175670e7dc64f76d77e15e9b8710c;hb=878daae9c337e712d5ec65232851dd5e58aca0b9;hp=d7ced430e052126d0e1c3841908bf2180f606c8b;hpb=30eb3e3520e9d4d7b9a9dbac0c5c0200485103c2;p=max%2Ftmk_keyboard.git diff --git a/common/keyboard.c b/common/keyboard.c index d7ced430..fa22116f 100644 --- a/common/keyboard.c +++ b/common/keyboard.c @@ -1,5 +1,5 @@ /* -Copyright 2011 Jun Wako +Copyright 2011,2012 Jun Wako This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,6 +25,7 @@ along with this program. If not, see . #include "debug.h" #include "command.h" #include "util.h" +#include "sendchar.h" #ifdef MOUSEKEY_ENABLE #include "mousekey.h" #endif @@ -543,7 +544,10 @@ static inline void process_key(keyevent_t event) void keyboard_init(void) { - debug_keyboard = true; + // TODO: to enable debug print magic key bind on boot time + + // TODO: configuration of sendchar impl + print_sendchar_func = sendchar; timer_init(); matrix_init(); @@ -555,6 +559,7 @@ void keyboard_init(void) void keyboard_task(void) { static matrix_row_t matrix_prev[MATRIX_ROWS]; + static uint8_t led_status = 0; matrix_row_t matrix_row = 0; matrix_row_t matrix_change = 0; @@ -563,7 +568,7 @@ void keyboard_task(void) matrix_row = matrix_get_row(r); matrix_change = matrix_row ^ matrix_prev[r]; if (matrix_change) { - matrix_debug(); + if (debug_matrix) matrix_print(); for (int c = 0; c < MATRIX_COLS; c++) { if (matrix_change & (1<