diff options
| author | tmk <nobody@nowhere> | 2013-03-05 21:20:39 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2013-03-05 21:20:39 +0900 |
| commit | 81d2753ab07890532ea8c4bd6a68de3e5e08ca33 (patch) | |
| tree | 685ba0477174789f5d64902a5cd96114346aa9d7 | |
| parent | 9e9a85c1426650148d0d83c900e432003ff174fb (diff) | |
| download | qmk_firmware-81d2753ab07890532ea8c4bd6a68de3e5e08ca33.tar.gz qmk_firmware-81d2753ab07890532ea8c4bd6a68de3e5e08ca33.zip | |
Remove matrix_key_count() from matrix.h
| -rw-r--r-- | common/matrix.h | 2 | ||||
| -rw-r--r-- | keyboard/hbkb/matrix.c | 14 |
2 files changed, 0 insertions, 16 deletions
diff --git a/common/matrix.h b/common/matrix.h index 48203c71d..d62acb668 100644 --- a/common/matrix.h +++ b/common/matrix.h | |||
| @@ -49,8 +49,6 @@ bool matrix_is_modified(void); | |||
| 49 | bool matrix_is_on(uint8_t row, uint8_t col); | 49 | bool matrix_is_on(uint8_t row, uint8_t col); |
| 50 | /* matrix state on row */ | 50 | /* matrix state on row */ |
| 51 | matrix_row_t matrix_get_row(uint8_t row); | 51 | matrix_row_t matrix_get_row(uint8_t row); |
| 52 | /* count keys pressed */ | ||
| 53 | uint8_t matrix_key_count(void); | ||
| 54 | /* print matrix for debug */ | 52 | /* print matrix for debug */ |
| 55 | void matrix_print(void); | 53 | void matrix_print(void); |
| 56 | 54 | ||
diff --git a/keyboard/hbkb/matrix.c b/keyboard/hbkb/matrix.c index f3a0cde5f..a24d24b8c 100644 --- a/keyboard/hbkb/matrix.c +++ b/keyboard/hbkb/matrix.c | |||
| @@ -182,19 +182,6 @@ void matrix_print(void) | |||
| 182 | } | 182 | } |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | uint8_t matrix_key_count(void) | ||
| 186 | { | ||
| 187 | uint8_t count = 0; | ||
| 188 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
| 189 | #if (MATRIX_COLS <= 8) | ||
| 190 | count += bitpop(matrix[i]); | ||
| 191 | #else | ||
| 192 | count += bitpop16(matrix[i]); | ||
| 193 | #endif | ||
| 194 | } | ||
| 195 | return count; | ||
| 196 | } | ||
| 197 | |||
| 198 | #ifdef MATRIX_HAS_GHOST | 185 | #ifdef MATRIX_HAS_GHOST |
| 199 | inline | 186 | inline |
| 200 | static bool matrix_has_ghost_in_row(uint8_t row) | 187 | static bool matrix_has_ghost_in_row(uint8_t row) |
| @@ -205,7 +192,6 @@ static bool matrix_has_ghost_in_row(uint8_t row) | |||
| 205 | 192 | ||
| 206 | // ghost exists in case same state as other row | 193 | // ghost exists in case same state as other row |
| 207 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { | 194 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { |
| 208 | //if (i != row && (matrix[i] & matrix[row]) == matrix[row]) | ||
| 209 | if (i != row && (matrix[i] & matrix[row])) | 195 | if (i != row && (matrix[i] & matrix[row])) |
| 210 | return true; | 196 | return true; |
| 211 | } | 197 | } |
