diff options
Diffstat (limited to 'keyboards')
50 files changed, 4 insertions, 516 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") < |