diff options
author | QMK Bot <hello@qmk.fm> | 2022-03-10 12:18:47 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2022-03-10 12:18:47 +0000 |
commit | cf44bde909f8da51fce7a36b345e2c06dd05faf3 (patch) | |
tree | 1c49c11c6d971a7c79a34ca695a87fc511baeaf9 | |
parent | cb65c7755ead2115296d7a346b907853e306ba10 (diff) | |
parent | bd70f5261cbb7fd4700bf9876da94c9661dadf63 (diff) |
Merge remote-tracking branch 'origin/master' into develop
51 files changed, 4 insertions, 527 deletions
diff --git a/keyboards/40percentclub/ut47/matrix.c b/keyboards/40percentclub/ut47/matrix.c index 89537592c5..97922e2dbe 100644 --- a/keyboards/40percentclub/ut47/matrix.c +++ b/keyboards/40percentclub/ut47/matrix.c @@ -118,15 +118,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 * col: 0 1 2 3 4 5 6 7 8 9 10 11 * pin: D7 E6 B4 B5 B6 B2 B3 B1 F7 F6 F5 F4 diff --git a/keyboards/amj96/matrix.c b/keyboards/amj96/matrix.c index ffd66d120f..2999c6241b 100644 --- a/keyboards/amj96/matrix.c +++ b/keyboards/amj96/matrix.c @@ -130,15 +130,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 * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 * pin: F7 F6 F5 F4 F1 F0 E6 D7 D6 D5 D1 D0 B7 B6 B0 C7 diff --git a/keyboards/bpiphany/hid_liber/matrix.c b/keyboards/bpiphany/hid_liber/matrix.c index da73c616d7..90e8a327b5 100755 --- a/keyboards/bpiphany/hid_liber/matrix.c +++ b/keyboards/bpiphany/hid_liber/matrix.c @@ -245,15 +245,3 @@ void matrix_print(void) print("\n"); } } - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - for (uint8_t j = 0; j < MATRIX_COLS; j++) { - if (matrix_is_on(i, j)) - count++; - } - } - return count; -} diff --git a/keyboards/bpiphany/kitten_paw/matrix.c b/keyboards/bpiphany/kitten_paw/matrix.c index 56114858f1..6548040c7c 100644 --- a/keyboards/bpiphany/kitten_paw/matrix.c +++ b/keyboards/bpiphany/kitten_paw/matrix.c @@ -132,14 +132,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 += bitpop32(matrix[i]); - } - return count; -} - static uint8_t read_rows(void) { return (PINC&(1<<7) ? 0 : (1<<0)) | diff --git a/keyboards/bpiphany/pegasushoof/2013/matrix.c b/keyboards/bpiphany/pegasushoof/2013/matrix.c index 09244982d9..a55cba7afd 100644 --- a/keyboards/bpiphany/pegasushoof/2013/matrix.c +++ b/keyboards/bpiphany/pegasushoof/2013/matrix.c @@ -132,15 +132,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; -} - static matrix_row_t read_cols(void) { return diff --git a/keyboards/bpiphany/pegasushoof/2015/matrix.c b/keyboards/bpiphany/pegasushoof/2015/matrix.c index b05869feda..2b142f9fc8 100644 --- a/keyboards/bpiphany/pegasushoof/2015/matrix.c +++ b/keyboards/bpiphany/pegasushoof/2015/matrix.c @@ -111,15 +111,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_get_row(i)); - } - return count; -} - static matrix_row_t read_cols(void) { return diff --git a/keyboards/bpiphany/tiger_lily/matrix.c b/keyboards/bpiphany/tiger_lily/matrix.c index 47a92268c8..abf6f3f42b 100644 --- a/keyboards/bpiphany/tiger_lily/matrix.c +++ b/keyboards/bpiphany/tiger_lily/matrix.c @@ -146,10 +146,3 @@ void matrix_print(void) { } #endif } - -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (uint8_t row = 0; row < MATRIX_ROWS; row++) - count += bitpop32(matrix[row]); - return count; -} diff --git a/keyboards/bpiphany/unloved_bastard/matrix.c b/keyboards/bpiphany/unloved_bastard/matrix.c index 328d9015c2..98cdf22f48 100644 --- a/keyboards/bpiphany/unloved_bastard/matrix.c +++ b/keyboards/bpiphany/unloved_bastard/matrix.c @@ -147,10 +147,3 @@ void matrix_print(void) { } #endif } - -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (uint8_t row = 0; row < MATRIX_ROWS; row++) - count += bitpop32(matrix[row]); - return count; -} diff --git a/keyboards/converter/ibm_terminal/matrix.c b/keyboards/converter/ibm_terminal/matrix.c index caa0a38051..3d6736a0cc 100644 --- a/keyboards/converter/ibm_terminal/matrix.c +++ b/keyboards/converter/ibm_terminal/matrix.c @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) #define print_matrix_header() print("\nr/c 01234567\n") -#define matrix_bitpop(i) bitpop(matrix[i]) #define ROW_SHIFTER ((uint8_t)1) diff --git a/keyboards/converter/palm_usb/matrix.c b/keyboards/converter/palm_usb/matrix.c index 010fd56c79..28d4b87d83 100644 --- a/keyboards/converter/palm_usb/matrix.c +++ b/keyboards/converter/palm_usb/matrix.c @@ -379,12 +379,3 @@ void matrix_print(void) print("\n"); } } - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop(matrix[i]); - } - return count; -} diff --git a/keyboards/converter/sun_usb/matrix.c b/keyboards/converter/sun_usb/matrix.c index e28d165d52..35ec391024 100644 --- a/keyboards/converter/sun_usb/matrix.c +++ b/keyboards/converter/sun_usb/matrix.c @@ -179,12 +179,3 @@ void matrix_print(void) print("\n"); } } - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop(matrix[i]); - } - return count; -} diff --git a/keyboards/converter/usb_usb/custom_matrix.cpp b/keyboards/converter/usb_usb/custom_matrix.cpp index 265fb2c68d..00b5bc5053 100644 --- a/keyboards/converter/usb_usb/custom_matrix.cpp +++ b/keyboards/converter/usb_usb/custom_matrix.cpp @@ -225,18 +225,6 @@ extern "C" return row_bits; } - uint8_t matrix_key_count(void) { - uint8_t count = 0; - - count += bitpop(local_keyboard_report.mods); - for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { - if (IS_ANY(local_keyboard_report.keys[i])) { - count++; - } - } - return count; - } - void matrix_print(void) { print("\nr/c 0123456789ABCDEF\n"); for (uint8_t row = 0; row < matrix_rows(); row++) { diff --git a/keyboards/dc01/arrow/matrix.c b/keyboards/dc01/arrow/matrix.c index b69e147914..e7c3bec2b5 100644 --- a/keyboards/dc01/arrow/matrix.c +++ b/keyboards/dc01/arrow/matrix.c @@ -48,17 +48,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -234,17 +231,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; -} - - - #if (DIODE_DIRECTION == COL2ROW) static void init_cols(void) @@ -388,4 +374,4 @@ static void unselect_cols(void) void matrix_setup(void){ i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c sei(); //enable interupts -}
\ No newline at end of file +} diff --git a/keyboards/dc01/left/matrix.c b/keyboards/dc01/left/matrix.c index 3eeb2586bc..8b8f89a081 100644 --- a/keyboards/dc01/left/matrix.c +++ b/keyboards/dc01/left/matrix.c @@ -52,17 +52,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -259,17 +256,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; -} - - - #if (DIODE_DIRECTION == COL2ROW) static void init_cols(void) diff --git a/keyboards/dc01/numpad/matrix.c b/keyboards/dc01/numpad/matrix.c index e8e2a1b14a..1dc90a6b84 100644 --- a/keyboards/dc01/numpad/matrix.c +++ b/keyboards/dc01/numpad/matrix.c @@ -48,17 +48,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -234,17 +231,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; -} - - - #if (DIODE_DIRECTION == COL2ROW) static void init_cols(void) @@ -388,4 +374,4 @@ static void unselect_cols(void) void matrix_setup(void){ i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c sei(); //enable interupts -}
\ No newline at end of file +} diff --git a/keyboards/dc01/right/matrix.c b/keyboards/dc01/right/matrix.c index 2509bd7d4c..f21dec1d2b 100644 --- a/keyboards/dc01/right/matrix.c +++ b/keyboards/dc01/right/matrix.c @@ -49,17 +49,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -235,17 +232,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; -} - - - #if (DIODE_DIRECTION == COL2ROW) static void init_cols(void) @@ -389,4 +375,4 @@ static void unselect_cols(void) void matrix_setup(void){ i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c sei(); //enable interupts -}
\ No newline at end of file +} diff --git a/keyboards/dichotomy/matrix.c b/keyboards/dichotomy/matrix.c index 806b66d498..dc90e7501e 100755 --- a/keyboards/dichotomy/matrix.c +++ b/keyboards/dichotomy/matrix.c @@ -34,17 +34,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -215,12 +212,3 @@ void matrix_print(void) print("\n"); } } - -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; -} diff --git a/keyboards/duck/jetfire/matrix.c b/keyboards/duck/jetfire/matrix.c index 729fa6dd14..2b64885842 100644 --- a/keyboards/duck/jetfire/matrix.c +++ b/keyboards/duck/jetfire/matrix.c @@ -136,15 +136,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 += bitpop32(matrix[i]); - } - return count; -} - static void init_ports(void) { // Rows are inputs (inputs are 0) @@ -268,4 +259,4 @@ static void select_col(uint8_t col) PORTB |= 0b00000001; break; } -}
\ No newline at end of file +} diff --git a/keyboards/gboards/ergotaco/matrix.c b/keyboards/gboards/ergotaco/matrix.c index 16300a7e4f..7e5d675218 100644 --- a/keyboards/gboards/ergotaco/matrix.c +++ b/keyboards/gboards/ergotaco/matrix.c @@ -221,15 +221,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; -} - // Remember this means ROWS static void init_cols(void) { diff --git a/keyboards/gboards/georgi/matrix.c b/keyboards/gboards/georgi/matrix.c index 7d635ad8d7..24bb2d7acf 100644 --- a/keyboards/gboards/georgi/matrix.c +++ b/keyboards/gboards/georgi/matrix.c @@ -242,15 +242,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; -} - // Remember this means ROWS static void init_cols(void) { diff --git a/keyboards/gboards/gergo/matrix.c b/keyboards/gboards/gergo/matrix.c index 443e97132b..3898246e30 100644 --- a/keyboards/gboards/gergo/matrix.c +++ b/keyboards/gboards/gergo/matrix.c @@ -286,14 +286,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; -} - // Remember this means ROWS static void init_cols(void) { // init on mcp23018 diff --git a/keyboards/gboards/gergoplex/matrix.c b/keyboards/gboards/gergoplex/matrix.c index a075b85725..d5b046fe40 100644 --- a/keyboards/gboards/gergoplex/matrix.c +++ b/keyboards/gboards/gergoplex/matrix.c @@ -164,13 +164,6 @@ void matrix_print(void) { print("\n"); } } -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; -} // Remember this means ROWS static void init_cols(void) { 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 <http://www.gnu.org/licenses/>. #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 <http://www.gnu.org/licenses/>. #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) { diff --git a/keyboards/helix/rev2/custom/matrix.c b/keyboards/helix/rev2/custom/matrix.c index 699c15358b..5221d7fd4e 100644 --- a/keyboards/helix/rev2/custom/matrix.c +++ b/keyboards/helix/rev2/custom/matrix.c @@ -309,15 +309,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; -} - static void init_cols(void) { for(int x = 0; x < MATRIX_COLS; x++) { diff --git a/keyboards/hhkb/ansi/matrix.c b/keyboards/hhkb/ansi/matrix.c index 5dde74cce9..8b0e4606bc 100644 --- a/keyboards/hhkb/ansi/matrix.c +++ b/keyboards/hhkb/ansi/matrix.c @@ -189,14 +189,6 @@ void matrix_print(void) } } -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { - count += bitpop16(matrix_get_row(r)); - } - return count; -} - void matrix_power_up(void) { KEY_POWER_ON(); } diff --git a/keyboards/hhkb/jp/matrix.c b/keyboards/hhkb/jp/matrix.c index 81db77fca7..9d04d62849 100644 --- a/keyboards/hhkb/jp/matrix.c +++ b/keyboards/hhkb/jp/matrix.c @@ -190,14 +190,6 @@ void matrix_print(void) } } -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { - count += bitpop16(matrix_get_row(r)); - } - return count; -} - void matrix_power_up(void) { KEY_POWER_ON(); } diff --git a/keyboards/honeycomb/matrix.c b/keyboards/honeycomb/matrix.c index fe1e4ce8ff..9a87ca9a2e 100755 --- a/keyboards/honeycomb/matrix.c +++ b/keyboards/honeycomb/matrix.c @@ -35,17 +35,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -191,12 +188,3 @@ void matrix_print(void) print("\n"); } } - -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; -} diff --git a/keyboards/hotdox/matrix.c b/keyboards/hotdox/matrix.c index 5d0b0f6dd5..0da5a3e3a2 100644 --- a/keyboards/hotdox/matrix.c +++ b/keyboards/hotdox/matrix.c @@ -160,15 +160,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; -} - static void init_cols(void) { // Pro Micro diff --git a/keyboards/kakunpc/angel64/alpha/matrix.c b/keyboards/kakunpc/angel64/alpha/matrix.c index 2851859cf2..8ca9841e48 100644 --- a/keyboards/kakunpc/angel64/alpha/matrix.c +++ b/keyboards/kakunpc/angel64/alpha/matrix.c @@ -27,17 +27,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -119,15 +116,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; -} - static void select_row(uint8_t row) { setPinOutput(row_pins[row]); diff --git a/keyboards/kakunpc/angel64/rev1/matrix.c b/keyboards/kakunpc/angel64/rev1/matrix.c index 2851859cf2..8ca9841e48 100644 --- a/keyboards/kakunpc/angel64/rev1/matrix.c +++ b/keyboards/kakunpc/angel64/rev1/matrix.c @@ -27,17 +27,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -119,15 +116,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; -} - static void select_row(uint8_t row) { setPinOutput(row_pins[row]); diff --git a/keyboards/kakunpc/thedogkeyboard/matrix.c b/keyboards/kakunpc/thedogkeyboard/matrix.c index 2851859cf2..8ca9841e48 100644 --- a/keyboards/kakunpc/thedogkeyboard/matrix.c +++ b/keyboards/kakunpc/thedogkeyboard/matrix.c @@ -27,17 +27,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -119,15 +116,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; -} - static void select_row(uint8_t row) { setPinOutput(row_pins[row]); diff --git a/keyboards/kinesis/alvicstep/matrix.c b/keyboards/kinesis/alvicstep/matrix.c index 9c05374510..5636418849 100644 --- a/keyboards/kinesis/alvicstep/matrix.c +++ b/keyboards/kinesis/alvicstep/matrix.c @@ -158,15 +158,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; -} - static matrix_row_t read_row(uint8_t row) { _delay_us(30); // without this wait read unstable value. diff --git a/keyboards/kmac/matrix.c b/keyboards/kmac/matrix.c index 3d5a3081d1..2052a9be71 100644 --- a/keyboards/kmac/matrix.c +++ b/keyboards/kmac/matrix.c @@ -27,17 +27,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -79,14 +76,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; -} - /* Columns 0 - 15 * These columns uses two 74HC237D 3 to 8 bit demultiplexers. * col / pin: PB6 PC6 PC7 PF1 PF0 diff --git a/keyboards/kmini/matrix.c b/keyboards/kmini/matrix.c index eee19054ea..f3e60eb869 100755 --- a/keyboards/kmini/matrix.c +++ b/keyboards/kmini/matrix.c @@ -132,15 +132,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 += bitpop32(matrix[i]); - } - return count; -} - static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { bool matrix_changed = false; diff --git a/keyboards/ktec/ergodone/matrix.c b/keyboards/ktec/ergodone/matrix.c index 3973ff3484..529974532a 100644 --- a/keyboards/ktec/ergodone/matrix.c +++ b/keyboards/ktec/ergodone/matrix.c @@ -158,15 +158,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 * * Pro Micro: 6 5 4 3 2 1 0 diff --git a/keyboards/moon/matrix.c b/keyboards/moon/matrix.c index 0615b60ad3..977338b2f6 100644 --- a/keyboards/moon/matrix.c +++ b/keyboards/moon/matrix.c @@ -76,17 +76,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -125,14 +122,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; -} - static void init_i2c(void) { pca9555_init(IC1); pca9555_init(IC2); diff --git a/keyboards/nek_type_a/matrix.c b/keyboards/nek_type_a/matrix.c index b396be9911..2989af5108 100644 --- a/keyboards/nek_type_a/matrix.c +++ b/keyboards/nek_type_a/matrix.c @@ -50,17 +50,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -234,17 +231,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; -} - - - #if (DIODE_DIRECTION == COL2ROW) static void init_cols(void) diff --git a/keyboards/redscarf_iiplus/verb/matrix.c b/keyboards/redscarf_iiplus/verb/matrix.c index 88ecb586b3..930d246434 100755 --- a/keyboards/redscarf_iiplus/verb/matrix.c +++ b/keyboards/redscarf_iiplus/verb/matrix.c @@ -27,17 +27,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -123,16 +120,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; -} - - #ifdef DIRECT_PINS static void init_pins(void) { diff --git a/keyboards/redscarf_iiplus/verc/matrix.c b/keyboards/redscarf_iiplus/verc/matrix.c index 88ecb586b3..930d246434 100755 --- a/keyboards/redscarf_iiplus/verc/matrix.c +++ b/keyboards/redscarf_iiplus/verc/matrix.c @@ -27,17 +27,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -123,16 +120,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; -} - - #ifdef DIRECT_PINS static void init_pins(void) { diff --git a/keyboards/redscarf_iiplus/verd/matrix.c b/keyboards/redscarf_iiplus/verd/matrix.c index d9dbb3c0a3..b703932229 100644 --- a/keyboards/redscarf_iiplus/verd/matrix.c +++ b/keyboards/redscarf_iiplus/verd/matrix.c @@ -27,17 +27,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -123,16 +120,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; -} - - #ifdef DIRECT_PINS static void init_pins(void) { diff --git a/keyboards/sirius/unigo66/custom_matrix.cpp b/keyboards/sirius/unigo66/custom_matrix.cpp index 955ce189a8..72e120400f 100644 --- a/keyboards/sirius/unigo66/custom_matrix.cpp +++ b/keyboards/sirius/unigo66/custom_matrix.cpp @@ -205,18 +205,6 @@ extern "C" return row_bits; } - uint8_t matrix_key_count(void) { - uint8_t count = 0; - - count += bitpop(local_keyboard_report.mods); - for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { - if (IS_ANY(local_keyboard_report.keys[i])) { - count++; - } - } - return count; - } - void matrix_print(void) { print("\nr/c 0123456789ABCDEF\n"); for (uint8_t row = 0; row < matrix_rows(); row++) { diff --git a/keyboards/sixkeyboard/matrix.c b/keyboards/sixkeyboard/matrix.c index a6b28f3a12..36ae05fb42 100644 --- a/keyboards/sixkeyboard/matrix.c +++ b/keyboards/sixkeyboard/matrix.c @@ -129,13 +129,3 @@ matrix_row_t matrix_get_row(uint8_t row) 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; -} - diff --git a/keyboards/sx60/matrix.c b/keyboards/sx60/matrix.c index 231e1c8836..94d581f574 100644 --- a/keyboards/sx60/matrix.c +++ b/keyboards/sx60/matrix.c @@ -42,17 +42,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -201,15 +198,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; -} - static void init_cols(void) { for(uint8_t x = 0; x < ATMEGA_COLS; x++) { diff --git a/keyboards/woodkeys/meira/matrix.c b/keyboards/woodkeys/meira/matrix.c index 8e8e9485b4..4fdc354237 100644 --- a/keyboards/woodkeys/meira/matrix.c +++ b/keyboards/woodkeys/meira/matrix.c @@ -45,17 +45,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 @@ -183,16 +180,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; -} - - static void init_rows(void) { for(uint8_t x = 0; x < MATRIX_ROWS; x++) { diff --git a/keyboards/ymdk/sp64/matrix.c b/keyboards/ymdk/sp64/matrix.c index 9a6e37bcdc..69276c7b3c 100644 --- a/keyboards/ymdk/sp64/matrix.c +++ b/keyboards/ymdk/sp64/matrix.c @@ -154,15 +154,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; -} - static void matrix_select_row(uint8_t row) { #ifdef RIGHT_HALF diff --git a/keyboards/yosino58/rev1/matrix.c b/keyboards/yosino58/rev1/matrix.c index e2be7113bf..802ce00cc6 100644 --- a/keyboards/yosino58/rev1/matrix.c +++ b/keyboards/yosino58/rev1/matrix.c @@ -311,15 +311,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; -} - static void init_cols(void) { for(int x = 0; x < MATRIX_COLS; x++) { diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c index 1497ceae71..2cf8484347 100644 --- a/quantum/matrix_common.c +++ b/quantum/matrix_common.c @@ -72,15 +72,12 @@ inline matrix_row_t matrix_get_row(uint8_t row) { #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(row) bitpop(matrix_get_row(row)) #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(row) bitpop16(matrix_get_row(row)) #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(row) bitpop32(matrix_get_row(row)) #endif void matrix_print(void) { @@ -94,14 +91,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; -} - #ifdef SPLIT_KEYBOARD bool matrix_post_scan(void) { bool changed = false; |