diff --git a/keyboards/cipulot/common/matrix.c b/keyboards/cipulot/common/matrix.c index cfa2efe050..a06a198e0a 100644 --- a/keyboards/cipulot/common/matrix.c +++ b/keyboards/cipulot/common/matrix.c @@ -17,9 +17,6 @@ #include "ec_switch_matrix.h" #include "matrix.h" -extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values - // Custom matrix init function void matrix_init_custom(void) { // Initialize EC diff --git a/keyboards/cipulot/ec_980c/matrix.c b/keyboards/cipulot/ec_980c/matrix.c index cfa2efe050..a06a198e0a 100644 --- a/keyboards/cipulot/ec_980c/matrix.c +++ b/keyboards/cipulot/ec_980c/matrix.c @@ -17,9 +17,6 @@ #include "ec_switch_matrix.h" #include "matrix.h" -extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values - // Custom matrix init function void matrix_init_custom(void) { // Initialize EC diff --git a/keyboards/cipulot/ec_typek/matrix.c b/keyboards/cipulot/ec_typek/matrix.c index cfa2efe050..a06a198e0a 100644 --- a/keyboards/cipulot/ec_typek/matrix.c +++ b/keyboards/cipulot/ec_typek/matrix.c @@ -17,9 +17,6 @@ #include "ec_switch_matrix.h" #include "matrix.h" -extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values - // Custom matrix init function void matrix_init_custom(void) { // Initialize EC diff --git a/keyboards/custommk/evo70/evo70.c b/keyboards/custommk/evo70/evo70.c index c20c25d3f0..e1c6d572f3 100644 --- a/keyboards/custommk/evo70/evo70.c +++ b/keyboards/custommk/evo70/evo70.c @@ -61,9 +61,6 @@ static bool starting_up = false; #define ENC_BONGO 9 #endif //bongocat - -extern matrix_row_t matrix[MATRIX_ROWS]; - char* enc_mode_str[] = { #ifdef BONGOCAT /* Splash */ "", @@ -394,7 +391,7 @@ void write_bongochar_at_pixel_xy(uint8_t x, uint8_t y, uint8_t data, bool invert bool is_key_down(void) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - if (matrix[i] > 0) { + if (matrix_get_row(i) > 0) { return true; } } @@ -488,10 +485,10 @@ bool is_new_tap(void) { static matrix_row_t old_matrix[] = { 0, 0, 0, 0, 0, 0 }; bool new_tap = false; for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - if (matrix[i] > old_matrix[i]) { // more 1's detected, there was a new tap + if (matrix_get_row(i) > old_matrix[i]) { // more 1's detected, there was a new tap new_tap = true; } - old_matrix[i] = matrix[i]; + old_matrix[i] = matrix_get_row(i); } return new_tap; } diff --git a/keyboards/gmmk/numpad/matrix.c b/keyboards/gmmk/numpad/matrix.c index 8d6e641a77..18a4ee7c46 100644 --- a/keyboards/gmmk/numpad/matrix.c +++ b/keyboards/gmmk/numpad/matrix.c @@ -1,9 +1,6 @@ // Copyright 2023 Cameron Varley (@RustedAperture) // SPDX-License-Identifier: GPL-2.0-or-later -/* - * scan matrix - */ #include "matrix.h" #include #include "atomic_util.h" @@ -11,13 +8,8 @@ #include "print.h" #include "debug.h" -/* matrix state(1:on, 0:off) */ -extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values -extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values - static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; -#define MATRIX_ROW_SHIFTER ((matrix_row_t)1) static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { diff --git a/keyboards/sekigon/grs_70ec/matrix.c b/keyboards/sekigon/grs_70ec/matrix.c index cd582b30e4..e6d6281812 100644 --- a/keyboards/sekigon/grs_70ec/matrix.c +++ b/keyboards/sekigon/grs_70ec/matrix.c @@ -35,10 +35,6 @@ #define ROWS_PER_HAND (MATRIX_ROWS / 2) -/* matrix state(1:on, 0:off) */ -extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values - // row offsets for each hand static uint8_t thisHand, thatHand; diff --git a/keyboards/work_louder/micro/matrix.c b/keyboards/work_louder/micro/matrix.c index 3944d676de..1c53487949 100644 --- a/keyboards/work_louder/micro/matrix.c +++ b/keyboards/work_louder/micro/matrix.c @@ -1,9 +1,6 @@ // Copyright 2022 Christopher Courtney, aka Drashna Jael're (@drashna) // SPDX-License-Identifier: GPL-2.0-or-later -/* - * scan matrix - */ #include "matrix.h" #include #include "atomic_util.h" @@ -12,13 +9,8 @@ #include "util.h" #include "debounce.h" -/* matrix state(1:on, 0:off) */ -extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values -extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values - static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; -#define MATRIX_ROW_SHIFTER ((matrix_row_t)1) static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON {