From: tmk Date: Tue, 5 Mar 2013 12:20:39 +0000 (+0900) Subject: Remove matrix_key_count() from matrix.h X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=81d2753ab07890532ea8c4bd6a68de3e5e08ca33;p=max%2Ftmk_keyboard.git Remove matrix_key_count() from matrix.h --- diff --git a/common/matrix.h b/common/matrix.h index 48203c71..d62acb66 100644 --- a/common/matrix.h +++ b/common/matrix.h @@ -49,8 +49,6 @@ bool matrix_is_modified(void); bool matrix_is_on(uint8_t row, uint8_t col); /* matrix state on row */ matrix_row_t matrix_get_row(uint8_t row); -/* count keys pressed */ -uint8_t matrix_key_count(void); /* print matrix for debug */ void matrix_print(void); diff --git a/keyboard/hbkb/matrix.c b/keyboard/hbkb/matrix.c index f3a0cde5..a24d24b8 100644 --- a/keyboard/hbkb/matrix.c +++ b/keyboard/hbkb/matrix.c @@ -182,19 +182,6 @@ void matrix_print(void) } } -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { -#if (MATRIX_COLS <= 8) - count += bitpop(matrix[i]); -#else - count += bitpop16(matrix[i]); -#endif - } - return count; -} - #ifdef MATRIX_HAS_GHOST inline static bool matrix_has_ghost_in_row(uint8_t row) @@ -205,7 +192,6 @@ static bool matrix_has_ghost_in_row(uint8_t row) // ghost exists in case same state as other row for (uint8_t i=0; i < MATRIX_ROWS; i++) { - //if (i != row && (matrix[i] & matrix[row]) == matrix[row]) if (i != row && (matrix[i] & matrix[row])) return true; }