From bd70f5261cbb7fd4700bf9876da94c9661dadf63 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 10 Mar 2022 23:18:07 +1100 Subject: Remove `matrix_key_count()` (#16603) * Remove `matrix_key_count()` * Remove `matrix_bitpop()` --- keyboards/handwired/dactyl/matrix.c | 9 --------- keyboards/handwired/frenchdev/matrix.c | 9 --------- keyboards/handwired/owlet60/matrix.c | 12 ------------ keyboards/handwired/promethium/matrix.c | 13 ------------- keyboards/handwired/pterodactyl/matrix.c | 9 --------- 5 files changed, 52 deletions(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/dactyl/matrix.c b/keyboards/handwired/dactyl/matrix.c index a70e8c5aca..5869b43c1b 100644 --- a/keyboards/handwired/dactyl/matrix.c +++ b/keyboards/handwired/dactyl/matrix.c @@ -307,15 +307,6 @@ void matrix_print(void) } } -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop16(matrix[i]); - } - return count; -} - #if (DIODE_DIRECTION == COL2ROW) static void init_cols(void) { diff --git a/keyboards/handwired/frenchdev/matrix.c b/keyboards/handwired/frenchdev/matrix.c index a043f78538..6dec9c6a74 100644 --- a/keyboards/handwired/frenchdev/matrix.c +++ b/keyboards/handwired/frenchdev/matrix.c @@ -196,15 +196,6 @@ void matrix_print(void) } } -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop16(matrix[i]); - } - return count; -} - /* Column pin configuration * * Teensy diff --git a/keyboards/handwired/owlet60/matrix.c b/keyboards/handwired/owlet60/matrix.c index 211273d1fa..3b68c08b45 100644 --- a/keyboards/handwired/owlet60/matrix.c +++ b/keyboards/handwired/owlet60/matrix.c @@ -33,17 +33,14 @@ along with this program. If not, see . #if (MATRIX_COLS <= 8) # define print_matrix_header() print("\nr/c 01234567\n") # define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) # define ROW_SHIFTER ((uint8_t)1) #elif (MATRIX_COLS <= 16) # define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") # define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop16(matrix[i]) # define ROW_SHIFTER ((uint16_t)1) #elif (MATRIX_COLS <= 32) # define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") # define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop32(matrix[i]) # define ROW_SHIFTER ((uint32_t)1) #endif @@ -130,15 +127,6 @@ void matrix_print(void) } } -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += matrix_bitpop(i); - } - return count; -} - // uses standard row code static void select_row(uint8_t row) { diff --git a/keyboards/handwired/promethium/matrix.c b/keyboards/handwired/promethium/matrix.c index 90dbce14a9..3b03ab8893 100644 --- a/keyboards/handwired/promethium/matrix.c +++ b/keyboards/handwired/promethium/matrix.c @@ -43,17 +43,14 @@ along with this program. If not, see . #if (MATRIX_COLS <= 8) # define print_matrix_header() print("\nr/c 01234567\n") # define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) # define ROW_SHIFTER ((uint8_t)1) #elif (MATRIX_COLS <= 16) # define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") # define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop16(matrix[i]) # define ROW_SHIFTER ((uint16_t)1) #elif (MATRIX_COLS <= 32) # define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") # define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop32(matrix[i]) # define ROW_SHIFTER ((uint32_t)1) #endif @@ -178,16 +175,6 @@ void matrix_print(void) } } -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += matrix_bitpop(i); - } - return count; -} - - #define ROW_MASK 0b11100000 static const uint8_t row_bit[MATRIX_ROWS] = { diff --git a/keyboards/handwired/pterodactyl/matrix.c b/keyboards/handwired/pterodactyl/matrix.c index d0f74802a0..9d81a64bb4 100644 --- a/keyboards/handwired/pterodactyl/matrix.c +++ b/keyboards/handwired/pterodactyl/matrix.c @@ -308,15 +308,6 @@ void matrix_print(void) } } -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop16(matrix[i]); - } - return count; -} - #if (DIODE_DIRECTION == COL2ROW) static void init_cols(void) { -- cgit v1.2.3