diff options
Diffstat (limited to 'tmk_core/common/keyboard.c')
| -rw-r--r-- | tmk_core/common/keyboard.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index c6d54ae33..bd543c45e 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c | |||
| @@ -96,17 +96,15 @@ void keyboard_init(void) { | |||
| 96 | 96 | ||
| 97 | /* does routine keyboard jobs */ | 97 | /* does routine keyboard jobs */ |
| 98 | void keyboard_task(void) { | 98 | void keyboard_task(void) { |
| 99 | static matrix_row_t previous_matrix[MATRIX_ROWS]; | 99 | static uint8_t led_status; |
| 100 | #ifdef MATRIX_HAS_GHOST | ||
| 101 | static matrix_row_t deghosting_matrix[MATRIX_ROWS]; | ||
| 102 | #endif | ||
| 103 | static uint8_t led_status = 0; | ||
| 104 | matrix_scan(); | 100 | matrix_scan(); |
| 105 | for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { | 101 | for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { |
| 102 | static matrix_row_t previous_matrix[MATRIX_ROWS]; | ||
| 106 | matrix_row_t state = matrix_get_row(r); | 103 | matrix_row_t state = matrix_get_row(r); |
| 107 | matrix_row_t changes = state ^ previous_matrix[r]; | 104 | matrix_row_t changes = state ^ previous_matrix[r]; |
| 108 | if (changes) { | 105 | if (changes) { |
| 109 | #ifdef MATRIX_HAS_GHOST | 106 | #ifdef MATRIX_HAS_GHOST |
| 107 | static matrix_row_t deghosting_matrix[MATRIX_ROWS]; | ||
| 110 | if (is_row_ghosting(r)) { | 108 | if (is_row_ghosting(r)) { |
| 111 | /* debugs the deghosting mechanism */ | 109 | /* debugs the deghosting mechanism */ |
| 112 | /* doesn't update previous_matrix until the ghosting has stopped | 110 | /* doesn't update previous_matrix until the ghosting has stopped |
