diff --git a/keyboards/barleycorn_smd/matrix.c b/keyboards/barleycorn_smd/matrix.c
index 315093c8a9..d8880364b6 100644
--- a/keyboards/barleycorn_smd/matrix.c
+++ b/keyboards/barleycorn_smd/matrix.c
@@ -14,10 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
+#include "matrix.h"
#include "wait.h"
-#include "quantum.h"
#include "i2c_master.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
diff --git a/keyboards/bpiphany/ghost_squid/matrix.c b/keyboards/bpiphany/ghost_squid/matrix.c
index b0ad607555..802d365cb8 100644
--- a/keyboards/bpiphany/ghost_squid/matrix.c
+++ b/keyboards/bpiphany/ghost_squid/matrix.c
@@ -17,7 +17,6 @@
*/
#include "matrix.h"
-#include "quantum.h"
matrix_row_t read_rows(void) {
return
diff --git a/keyboards/centromere/matrix.c b/keyboards/centromere/matrix.c
index 0218adf39b..387d31ee07 100644
--- a/keyboards/centromere/matrix.c
+++ b/keyboards/centromere/matrix.c
@@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "uart.h"
diff --git a/keyboards/converter/siemens_tastatur/matrix.c b/keyboards/converter/siemens_tastatur/matrix.c
index ea1aa2287e..78054ee0fa 100644
--- a/keyboards/converter/siemens_tastatur/matrix.c
+++ b/keyboards/converter/siemens_tastatur/matrix.c
@@ -14,10 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include
-#include "quantum.h"
#include "timer.h"
#include "wait.h"
#include "print.h"
diff --git a/keyboards/custommk/evo70_r2/matrix.c b/keyboards/custommk/evo70_r2/matrix.c
index 99a23a4542..99c3428d80 100644
--- a/keyboards/custommk/evo70_r2/matrix.c
+++ b/keyboards/custommk/evo70_r2/matrix.c
@@ -1,6 +1,7 @@
// Copyright 2023 David Hoelscher (@customMK)
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "quantum.h"
+#include "matrix.h"
+#include
// Pin definitions
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
diff --git a/keyboards/dc01/right/matrix.c b/keyboards/dc01/right/matrix.c
index 04a6d03804..f9b6738145 100644
--- a/keyboards/dc01/right/matrix.c
+++ b/keyboards/dc01/right/matrix.c
@@ -15,8 +15,6 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#if defined(__AVR__)
#include
#include
@@ -31,7 +29,6 @@ along with this program. If not, see .
#include "timer.h"
#include "i2c_slave.h"
#include "lufa.h"
-#include "quantum.h"
#define SLAVE_I2C_ADDRESS 0x32
diff --git a/keyboards/dp60/matrix.c b/keyboards/dp60/matrix.c
index e32c9a58f9..22156745f1 100644
--- a/keyboards/dp60/matrix.c
+++ b/keyboards/dp60/matrix.c
@@ -13,7 +13,10 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
+#include "print.h"
+#include "bitwise.h"
+#include "wait.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5
diff --git a/keyboards/duck/orion/v3/matrix.c b/keyboards/duck/orion/v3/matrix.c
index c82d5dd999..f392b9b190 100644
--- a/keyboards/duck/orion/v3/matrix.c
+++ b/keyboards/duck/orion/v3/matrix.c
@@ -14,7 +14,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
+#include "debug.h"
+#include "bitwise.h"
+#include "wait.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5
diff --git a/keyboards/evyd13/wasdat/matrix.c b/keyboards/evyd13/wasdat/matrix.c
index 60a1ea235a..ae4bb6cb3a 100644
--- a/keyboards/evyd13/wasdat/matrix.c
+++ b/keyboards/evyd13/wasdat/matrix.c
@@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "matrix.h"
-#include "quantum.h"
#include "sn74x138.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
diff --git a/keyboards/evyd13/wasdat_code/matrix.c b/keyboards/evyd13/wasdat_code/matrix.c
index f30ea3355a..d392a31d7c 100644
--- a/keyboards/evyd13/wasdat_code/matrix.c
+++ b/keyboards/evyd13/wasdat_code/matrix.c
@@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "matrix.h"
-#include "quantum.h"
#include "sn74x138.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
diff --git a/keyboards/geistmaschine/macropod/matrix.c b/keyboards/geistmaschine/macropod/matrix.c
index ebc10e2e5a..98796133f1 100644
--- a/keyboards/geistmaschine/macropod/matrix.c
+++ b/keyboards/geistmaschine/macropod/matrix.c
@@ -14,8 +14,9 @@
* along with this program. If not, see .
*/
+#include "matrix.h"
#include "pca9555.h"
-#include "quantum.h"
+#include "timer.h"
// PCA9555 i2c address, 0x20: A0 = 0, A1 = 0, A2 = 0
#define IC1 0x20
diff --git a/keyboards/gl516/a52gl/matrix.c b/keyboards/gl516/a52gl/matrix.c
index 1a97fdfd61..af13768b08 100644
--- a/keyboards/gl516/a52gl/matrix.c
+++ b/keyboards/gl516/a52gl/matrix.c
@@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#include "matrix.h"
-#include "quantum.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
diff --git a/keyboards/gl516/j73gl/matrix.c b/keyboards/gl516/j73gl/matrix.c
index 1a97fdfd61..af13768b08 100644
--- a/keyboards/gl516/j73gl/matrix.c
+++ b/keyboards/gl516/j73gl/matrix.c
@@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#include "matrix.h"
-#include "quantum.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
diff --git a/keyboards/gl516/n51gl/matrix.c b/keyboards/gl516/n51gl/matrix.c
index 1a97fdfd61..af13768b08 100644
--- a/keyboards/gl516/n51gl/matrix.c
+++ b/keyboards/gl516/n51gl/matrix.c
@@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#include "matrix.h"
-#include "quantum.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
diff --git a/keyboards/glenpickle/chimera_ergo/matrix.c b/keyboards/glenpickle/chimera_ergo/matrix.c
index 32d7b09310..47c3c61e27 100644
--- a/keyboards/glenpickle/chimera_ergo/matrix.c
+++ b/keyboards/glenpickle/chimera_ergo/matrix.c
@@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "uart.h"
diff --git a/keyboards/glenpickle/chimera_ls/matrix.c b/keyboards/glenpickle/chimera_ls/matrix.c
index 9a69724eb7..15a29c5a86 100644
--- a/keyboards/glenpickle/chimera_ls/matrix.c
+++ b/keyboards/glenpickle/chimera_ls/matrix.c
@@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "uart.h"
diff --git a/keyboards/glenpickle/chimera_ortho/matrix.c b/keyboards/glenpickle/chimera_ortho/matrix.c
index 9a69724eb7..15a29c5a86 100644
--- a/keyboards/glenpickle/chimera_ortho/matrix.c
+++ b/keyboards/glenpickle/chimera_ortho/matrix.c
@@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "uart.h"
diff --git a/keyboards/glenpickle/chimera_ortho_plus/matrix.c b/keyboards/glenpickle/chimera_ortho_plus/matrix.c
index 32d7b09310..47c3c61e27 100644
--- a/keyboards/glenpickle/chimera_ortho_plus/matrix.c
+++ b/keyboards/glenpickle/chimera_ortho_plus/matrix.c
@@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "uart.h"
diff --git a/keyboards/gmmk/numpad/matrix.c b/keyboards/gmmk/numpad/matrix.c
index 99adb38f18..68d4ab6524 100644
--- a/keyboards/gmmk/numpad/matrix.c
+++ b/keyboards/gmmk/numpad/matrix.c
@@ -4,15 +4,12 @@
/*
* scan matrix
*/
-#include
-#include
+#include "matrix.h"
+#include
+#include "atomic_util.h"
#include "wait.h"
#include "print.h"
#include "debug.h"
-#include "util.h"
-#include "matrix.h"
-#include "debounce.h"
-#include "quantum.h"
/* matrix state(1:on, 0:off) */
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
diff --git a/keyboards/halfcliff/matrix.c b/keyboards/halfcliff/matrix.c
index fd18fd27bd..99598dc1b7 100644
--- a/keyboards/halfcliff/matrix.c
+++ b/keyboards/halfcliff/matrix.c
@@ -14,15 +14,12 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
-#include "util.h"
#include "matrix.h"
-#include "debounce.h"
-#include "quantum.h"
+#include "atomic_util.h"
#include "split_util.h"
-#include "config.h"
#include "transport.h"
+#include "debounce.h"
+#include "wait.h"
#define ERROR_DISCONNECT_COUNT 5
diff --git a/keyboards/handwired/dqz11n1g/matrix.c b/keyboards/handwired/dqz11n1g/matrix.c
index d93dd853b6..398f961aa5 100644
--- a/keyboards/handwired/dqz11n1g/matrix.c
+++ b/keyboards/handwired/dqz11n1g/matrix.c
@@ -15,14 +15,7 @@
along with this program. If not, see .
*/
-#include
-#include
-#include
-
-#include
-
#include "spi_master.h"
-#include "quantum.h"
#include "matrix.h"
static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
diff --git a/keyboards/handwired/dygma/raise/matrix.c b/keyboards/handwired/dygma/raise/matrix.c
index bbcf697a59..3f241e8973 100644
--- a/keyboards/handwired/dygma/raise/matrix.c
+++ b/keyboards/handwired/dygma/raise/matrix.c
@@ -13,8 +13,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
#include "i2c_master.h"
+#include "wait.h"
#include
#include "wire-protocol-constants.h"
diff --git a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
index 8a303714cf..22d92dd99a 100644
--- a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
+++ b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
@@ -14,12 +14,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#ifndef readPort
# include "gpio_extr.h"
#endif
diff --git a/keyboards/handwired/symmetric70_proto/matrix_fast/matrix.c b/keyboards/handwired/symmetric70_proto/matrix_fast/matrix.c
index 2bc97bd9e8..3acbdfbeda 100644
--- a/keyboards/handwired/symmetric70_proto/matrix_fast/matrix.c
+++ b/keyboards/handwired/symmetric70_proto/matrix_fast/matrix.c
@@ -15,9 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
// clang-format off
-#include
-#include
-#include
#ifndef readPort
# include "gpio_extr.h"
#endif
@@ -25,7 +22,6 @@ along with this program. If not, see .
#include "matrix.h"
#include "matrix_extr.h"
#include "debounce.h"
-#include "quantum.h"
#define ALWAYS_INLINE inline __attribute__((always_inline))
#define NO_INLINE __attribute__((noinline))
diff --git a/keyboards/hazel/bad_wings/matrix.c b/keyboards/hazel/bad_wings/matrix.c
index 496bebd58f..8a56a927c1 100644
--- a/keyboards/hazel/bad_wings/matrix.c
+++ b/keyboards/hazel/bad_wings/matrix.c
@@ -2,12 +2,11 @@
// Copyright 2023 @jasonhazel (Jason Hazel)
// SPDX-License-Identifier: GPL-3.0-or-later
-#include "quantum.h"
-#include "spi_master.h"
-#include /* memset */
-#include /* close */
-#include "quantum.h"
#include "matrix.h"
+#include
+#include "spi_master.h"
+#include "debug.h"
+#include "wait.h"
#if (!defined(SHIFTREG_MATRIX_COL_CS))
# error Missing shift register I/O pin definitions
diff --git a/keyboards/hhkb/yang/matrix.c b/keyboards/hhkb/yang/matrix.c
index f0eccc899d..c82c77bed3 100644
--- a/keyboards/hhkb/yang/matrix.c
+++ b/keyboards/hhkb/yang/matrix.c
@@ -16,7 +16,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
+#include "debug.h"
+#include "timer.h"
+#include "wait.h"
+#include "suspend.h"
+#include
#ifdef BLUETOOTH_ENABLE
# include "adafruit_ble.h"
diff --git a/keyboards/hineybush/hbcp/matrix.c b/keyboards/hineybush/hbcp/matrix.c
index d493a7e9ef..69ae6ab7b7 100644
--- a/keyboards/hineybush/hbcp/matrix.c
+++ b/keyboards/hineybush/hbcp/matrix.c
@@ -14,12 +14,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
static const pin_t row_pins[] = MATRIX_ROW_PINS;
static const pin_t col_pins[] = MATRIX_COL_PINS;
diff --git a/keyboards/ibm/model_m/mschwingen/matrix.c b/keyboards/ibm/model_m/mschwingen/matrix.c
index 361803edec..85df5e5d6f 100644
--- a/keyboards/ibm/model_m/mschwingen/matrix.c
+++ b/keyboards/ibm/model_m/mschwingen/matrix.c
@@ -14,12 +14,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include
-#include
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#include "spi_master.h"
#include "print.h"
#include "mschwingen.h"
diff --git a/keyboards/jones/v03/matrix.c b/keyboards/jones/v03/matrix.c
index efcd7043e6..445c1acdc0 100644
--- a/keyboards/jones/v03/matrix.c
+++ b/keyboards/jones/v03/matrix.c
@@ -14,10 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "matrix.h"
-#include "quantum.h"
#define ROW_SHIFTER ((uint16_t)1)
diff --git a/keyboards/jones/v03_1/matrix.c b/keyboards/jones/v03_1/matrix.c
index efcd7043e6..445c1acdc0 100644
--- a/keyboards/jones/v03_1/matrix.c
+++ b/keyboards/jones/v03_1/matrix.c
@@ -14,10 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "matrix.h"
-#include "quantum.h"
#define ROW_SHIFTER ((uint16_t)1)
diff --git a/keyboards/joshajohnson/hub16/matrix.c b/keyboards/joshajohnson/hub16/matrix.c
index 4f32070e66..0fe1d41dad 100644
--- a/keyboards/joshajohnson/hub16/matrix.c
+++ b/keyboards/joshajohnson/hub16/matrix.c
@@ -14,12 +14,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "util.h"
#include "matrix.h"
-#include "quantum.h"
// Encoder things
#define SWITCH_1 F7
diff --git a/keyboards/kagizaraya/chidori/matrix.c b/keyboards/kagizaraya/chidori/matrix.c
index 6228125d92..e506916f38 100644
--- a/keyboards/kagizaraya/chidori/matrix.c
+++ b/keyboards/kagizaraya/chidori/matrix.c
@@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "board.h"
diff --git a/keyboards/kakunpc/angel64/alpha/matrix.c b/keyboards/kakunpc/angel64/alpha/matrix.c
index 7abc50005b..5d731b1068 100644
--- a/keyboards/kakunpc/angel64/alpha/matrix.c
+++ b/keyboards/kakunpc/angel64/alpha/matrix.c
@@ -14,15 +14,12 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")
diff --git a/keyboards/kakunpc/angel64/rev1/matrix.c b/keyboards/kakunpc/angel64/rev1/matrix.c
index 7abc50005b..5d731b1068 100644
--- a/keyboards/kakunpc/angel64/rev1/matrix.c
+++ b/keyboards/kakunpc/angel64/rev1/matrix.c
@@ -14,15 +14,12 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")
diff --git a/keyboards/kakunpc/choc_taro/matrix.c b/keyboards/kakunpc/choc_taro/matrix.c
index 02421551da..4547f1a047 100644
--- a/keyboards/kakunpc/choc_taro/matrix.c
+++ b/keyboards/kakunpc/choc_taro/matrix.c
@@ -14,10 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "matrix.h"
-#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define ROW_SHIFTER ((uint8_t)1)
diff --git a/keyboards/kakunpc/thedogkeyboard/matrix.c b/keyboards/kakunpc/thedogkeyboard/matrix.c
index 7abc50005b..5d731b1068 100644
--- a/keyboards/kakunpc/thedogkeyboard/matrix.c
+++ b/keyboards/kakunpc/thedogkeyboard/matrix.c
@@ -14,15 +14,12 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")
diff --git a/keyboards/kbdmania/kmac/matrix.c b/keyboards/kbdmania/kmac/matrix.c
index 6569867032..1843d19fd2 100644
--- a/keyboards/kbdmania/kmac/matrix.c
+++ b/keyboards/kbdmania/kmac/matrix.c
@@ -14,15 +14,12 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")
diff --git a/keyboards/kbdmania/kmac_pad/matrix.c b/keyboards/kbdmania/kmac_pad/matrix.c
index 476e40f514..ad7919e33c 100644
--- a/keyboards/kbdmania/kmac_pad/matrix.c
+++ b/keyboards/kbdmania/kmac_pad/matrix.c
@@ -17,7 +17,6 @@ along with this program. If not, see .
#include "wait.h"
#include "matrix.h"
-#include "quantum.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
diff --git a/keyboards/keyboardio/model01/matrix.c b/keyboards/keyboardio/model01/matrix.c
index 4b788d2812..20359ca971 100644
--- a/keyboards/keyboardio/model01/matrix.c
+++ b/keyboards/keyboardio/model01/matrix.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
#include "i2c_master.h"
#include
#include "model01.h"
diff --git a/keyboards/keychron/c2_pro/matrix.c b/keyboards/keychron/c2_pro/matrix.c
index 5065f97aa7..8c954c73d0 100644
--- a/keyboards/keychron/c2_pro/matrix.c
+++ b/keyboards/keychron/c2_pro/matrix.c
@@ -14,7 +14,9 @@
* along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
+#include "atomic_util.h"
+#include
#ifndef SHIFT_COL_START
# define SHIFT_COL_START 8
diff --git a/keyboards/keychron/q10/matrix.c b/keyboards/keychron/q10/matrix.c
index 5c035b0e42..2c2d2ccc37 100644
--- a/keyboards/keychron/q10/matrix.c
+++ b/keyboards/keychron/q10/matrix.c
@@ -15,7 +15,8 @@
*/
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
+#include
// Pin connected to DS of 74HC595
#define DATA_PIN A7
diff --git a/keyboards/keychron/q12/matrix.c b/keyboards/keychron/q12/matrix.c
index 8229517fd9..cf8361bd23 100644
--- a/keyboards/keychron/q12/matrix.c
+++ b/keyboards/keychron/q12/matrix.c
@@ -15,7 +15,8 @@
*/
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
+#include
// Pin connected to DS of 74HC595
#define DATA_PIN C15
diff --git a/keyboards/keychron/q1v2/matrix.c b/keyboards/keychron/q1v2/matrix.c
index d008a79384..2bdf4bdec7 100644
--- a/keyboards/keychron/q1v2/matrix.c
+++ b/keyboards/keychron/q1v2/matrix.c
@@ -14,7 +14,9 @@
* along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
+#include "atomic_util.h"
+#include
// Pin connected to DS of 74HC595
#define DATA_PIN A7
diff --git a/keyboards/keychron/q3/matrix.c b/keyboards/keychron/q3/matrix.c
index 26830780ff..188156789b 100644
--- a/keyboards/keychron/q3/matrix.c
+++ b/keyboards/keychron/q3/matrix.c
@@ -15,7 +15,8 @@
*/
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
+#include
// Pin connected to DS of 74HC595
#define DATA_PIN A7
diff --git a/keyboards/keychron/q5/matrix.c b/keyboards/keychron/q5/matrix.c
index 28ef877504..4809b20677 100644
--- a/keyboards/keychron/q5/matrix.c
+++ b/keyboards/keychron/q5/matrix.c
@@ -15,7 +15,8 @@
*/
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
+#include
// Pin connected to DS of 74HC595
#define DATA_PIN C15
diff --git a/keyboards/keychron/q6/matrix.c b/keyboards/keychron/q6/matrix.c
index 11f3432e6b..c59b229cfa 100644
--- a/keyboards/keychron/q6/matrix.c
+++ b/keyboards/keychron/q6/matrix.c
@@ -15,7 +15,8 @@
*/
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
+#include
// Pin connected to DS of 74HC595
#define DATA_PIN C15
diff --git a/keyboards/keychron/q65/matrix.c b/keyboards/keychron/q65/matrix.c
index 5785f5d570..206e301226 100644
--- a/keyboards/keychron/q65/matrix.c
+++ b/keyboards/keychron/q65/matrix.c
@@ -15,7 +15,8 @@
*/
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
+#include
// Pin connected to DS of 74HC595
#define DATA_PIN C15
diff --git a/keyboards/keychron/v1/matrix.c b/keyboards/keychron/v1/matrix.c
index 82a883834f..7b9136d490 100644
--- a/keyboards/keychron/v1/matrix.c
+++ b/keyboards/keychron/v1/matrix.c
@@ -15,7 +15,8 @@
*/
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
+#include
// Pin connected to DS of 74HC595
#define DATA_PIN A7
diff --git a/keyboards/keychron/v10/matrix.c b/keyboards/keychron/v10/matrix.c
index 9269fed8d6..87cda1774a 100644
--- a/keyboards/keychron/v10/matrix.c
+++ b/keyboards/keychron/v10/matrix.c
@@ -15,7 +15,8 @@
*/
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
+#include
#ifndef PIN_USED_74HC595
# define PIN_USED_74HC595 8
diff --git a/keyboards/keychron/v3/matrix.c b/keyboards/keychron/v3/matrix.c
index 44a1676afa..c0c39d5b5f 100644
--- a/keyboards/keychron/v3/matrix.c
+++ b/keyboards/keychron/v3/matrix.c
@@ -15,7 +15,8 @@
*/
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
+#include
// Pin connected to DS of 74HC595
#define DATA_PIN A7
diff --git a/keyboards/keychron/v5/matrix.c b/keyboards/keychron/v5/matrix.c
index ced8442881..fc3a1c4c2c 100644
--- a/keyboards/keychron/v5/matrix.c
+++ b/keyboards/keychron/v5/matrix.c
@@ -15,7 +15,8 @@
*/
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
+#include
// Pin connected to DS of 74HC595
#define DATA_PIN C15
diff --git a/keyboards/keychron/v6/matrix.c b/keyboards/keychron/v6/matrix.c
index 9269fed8d6..87cda1774a 100644
--- a/keyboards/keychron/v6/matrix.c
+++ b/keyboards/keychron/v6/matrix.c
@@ -15,7 +15,8 @@
*/
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
+#include
#ifndef PIN_USED_74HC595
# define PIN_USED_74HC595 8
diff --git a/keyboards/kinesis/nguyenvietyen/matrix.c b/keyboards/kinesis/nguyenvietyen/matrix.c
index d6ea67da68..4e4ca6f55c 100644
--- a/keyboards/kinesis/nguyenvietyen/matrix.c
+++ b/keyboards/kinesis/nguyenvietyen/matrix.c
@@ -3,8 +3,6 @@
#include "matrix.h"
-#include "quantum.h"
-
static matrix_row_t read_row(uint8_t row) {
matrix_io_delay(); // without this wait read unstable value.
diff --git a/keyboards/matrix/abelx/matrix.c b/keyboards/matrix/abelx/matrix.c
index d8d87b7d89..d74ed95775 100644
--- a/keyboards/matrix/abelx/matrix.c
+++ b/keyboards/matrix/abelx/matrix.c
@@ -17,10 +17,6 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include
-#include "quantum.h"
#include "matrix.h"
#include "tca6424.h"
#include "abelx.h"
diff --git a/keyboards/matrix/m12og/rev1/matrix.c b/keyboards/matrix/m12og/rev1/matrix.c
index 9c36153da1..c127aa35b9 100644
--- a/keyboards/matrix/m12og/rev1/matrix.c
+++ b/keyboards/matrix/m12og/rev1/matrix.c
@@ -14,12 +14,9 @@
* along with this program. If not, see .
*/
-#include
-#include
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
diff --git a/keyboards/matrix/m20add/matrix.c b/keyboards/matrix/m20add/matrix.c
index e9ddbdff62..85f5863725 100644
--- a/keyboards/matrix/m20add/matrix.c
+++ b/keyboards/matrix/m20add/matrix.c
@@ -2,10 +2,6 @@
* matrix.c
*/
-#include
-#include
-#include
-#include "quantum.h"
#include "matrix.h"
#include "tca6424.h"
#include "m20add.h"
diff --git a/keyboards/matrix/noah/matrix.c b/keyboards/matrix/noah/matrix.c
index 90e7006b78..14e8188cb5 100644
--- a/keyboards/matrix/noah/matrix.c
+++ b/keyboards/matrix/noah/matrix.c
@@ -2,16 +2,10 @@
* matrix.c
*/
-#include
-#include
-#include
-#include
-#include
-#include "quantum.h"
+#include "matrix.h"
#include "timer.h"
#include "wait.h"
#include "print.h"
-#include "matrix.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5
@@ -167,16 +161,16 @@ matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
void matrix_print(void)
{
- printf("\nr/c 01234567\n");
+ xprintf("\nr/c 01234567\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- printf("%X0: ", row);
+ xprintf("%X0: ", row);
matrix_row_t data = matrix_get_row(row);
for (int col = 0; col < MATRIX_COLS; col++) {
if (data & (1<.
*/
-#include
-#include
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
diff --git a/keyboards/mechlovin/infinity87/rev2/matrix.c b/keyboards/mechlovin/infinity87/rev2/matrix.c
index b1b0d20654..62a56f687c 100644
--- a/keyboards/mechlovin/infinity87/rev2/matrix.c
+++ b/keyboards/mechlovin/infinity87/rev2/matrix.c
@@ -16,13 +16,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
diff --git a/keyboards/mechlovin/infinity875/matrix.c b/keyboards/mechlovin/infinity875/matrix.c
index b1b0d20654..62a56f687c 100644
--- a/keyboards/mechlovin/infinity875/matrix.c
+++ b/keyboards/mechlovin/infinity875/matrix.c
@@ -16,13 +16,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
diff --git a/keyboards/mechlovin/olly/jf/rev1/matrix.c b/keyboards/mechlovin/olly/jf/rev1/matrix.c
index c01879c9a5..2abda55d0e 100644
--- a/keyboards/mechlovin/olly/jf/rev1/matrix.c
+++ b/keyboards/mechlovin/olly/jf/rev1/matrix.c
@@ -16,13 +16,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
diff --git a/keyboards/mechlovin/serratus/matrix.c b/keyboards/mechlovin/serratus/matrix.c
index b1b0d20654..62a56f687c 100644
--- a/keyboards/mechlovin/serratus/matrix.c
+++ b/keyboards/mechlovin/serratus/matrix.c
@@ -16,13 +16,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
diff --git a/keyboards/mexsistor/ludmila/matrix.c b/keyboards/mexsistor/ludmila/matrix.c
index 338286a7db..5d27ec683f 100644
--- a/keyboards/mexsistor/ludmila/matrix.c
+++ b/keyboards/mexsistor/ludmila/matrix.c
@@ -14,12 +14,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "util.h"
#include "matrix.h"
-#include "quantum.h"
// Encoder things
#define ENC_SW F7
diff --git a/keyboards/miiiw/blackio83/matrix.c b/keyboards/miiiw/blackio83/matrix.c
index 841ff3c16e..ab252f919b 100644
--- a/keyboards/miiiw/blackio83/matrix.c
+++ b/keyboards/miiiw/blackio83/matrix.c
@@ -14,8 +14,8 @@
* along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
+#include "wait.h"
#include "common/shift_register.h"
static uint8_t read_rows(void);
diff --git a/keyboards/mitosis/matrix.c b/keyboards/mitosis/matrix.c
index e5389bb113..f122b98957 100644
--- a/keyboards/mitosis/matrix.c
+++ b/keyboards/mitosis/matrix.c
@@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "uart.h"
diff --git a/keyboards/moon/matrix.c b/keyboards/moon/matrix.c
index 8c9b6214db..1cb9590e9f 100644
--- a/keyboards/moon/matrix.c
+++ b/keyboards/moon/matrix.c
@@ -14,15 +14,12 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#include "pca9555.h"
/*
diff --git a/keyboards/mt/split75/matrix.c b/keyboards/mt/split75/matrix.c
index 196a543faa..df5e9c056b 100644
--- a/keyboards/mt/split75/matrix.c
+++ b/keyboards/mt/split75/matrix.c
@@ -15,9 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
-#include "quantum.h"
+#include "matrix.h"
#include "i2c_master.h"
#define RIGHT_HALF
diff --git a/keyboards/nullbitsco/nibble/matrix.c b/keyboards/nullbitsco/nibble/matrix.c
index 496c5dbe32..6508b704e9 100644
--- a/keyboards/nullbitsco/nibble/matrix.c
+++ b/keyboards/nullbitsco/nibble/matrix.c
@@ -13,7 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
+#include "wait.h"
#define COL_SHIFTER ((uint32_t)1)
diff --git a/keyboards/nullbitsco/snap/matrix.c b/keyboards/nullbitsco/snap/matrix.c
index ceb9cd8984..3cd3f5c37e 100644
--- a/keyboards/nullbitsco/snap/matrix.c
+++ b/keyboards/nullbitsco/snap/matrix.c
@@ -13,13 +13,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include
-#include
-#include
-#include "util.h"
#include "matrix.h"
+#include
#include "split_util.h"
-#include "quantum.h"
+#include "wait.h"
#define VIRT_COLS_PER_HAND 1
#define PHYS_COLS_PER_HAND (MATRIX_COLS - VIRT_COLS_PER_HAND)
diff --git a/keyboards/oddforge/vea/matrix.c b/keyboards/oddforge/vea/matrix.c
index 8b054ccbe0..36d4d3d353 100644
--- a/keyboards/oddforge/vea/matrix.c
+++ b/keyboards/oddforge/vea/matrix.c
@@ -15,9 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
-#include "quantum.h"
+#include "matrix.h"
#include "i2c_master.h"
#define RIGHT_HALF
diff --git a/keyboards/om60/matrix.c b/keyboards/om60/matrix.c
index 3686780468..b0e252ec45 100644
--- a/keyboards/om60/matrix.c
+++ b/keyboards/om60/matrix.c
@@ -15,7 +15,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
+#include "wait.h"
#if (MATRIX_COLS <= 8)
# define ROW_SHIFTER ((uint8_t)1)
diff --git a/keyboards/pierce/matrix.c b/keyboards/pierce/matrix.c
index 5023024b8b..bcc88f7aa9 100644
--- a/keyboards/pierce/matrix.c
+++ b/keyboards/pierce/matrix.c
@@ -14,7 +14,7 @@
* along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
#include "i2c_slave.h"
#define MY_I2C_ADDRESS (0x20U << 1)
diff --git a/keyboards/planck/rev6_drop/matrix.c b/keyboards/planck/rev6_drop/matrix.c
index e31e473ae2..d140356738 100644
--- a/keyboards/planck/rev6_drop/matrix.c
+++ b/keyboards/planck/rev6_drop/matrix.c
@@ -15,7 +15,8 @@
* along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
+#include "wait.h"
/* matrix state(1:on, 0:off) */
static pin_t matrix_row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
diff --git a/keyboards/planck/rev7/matrix.c b/keyboards/planck/rev7/matrix.c
index 350ce93ce0..8cadfa5e8d 100644
--- a/keyboards/planck/rev7/matrix.c
+++ b/keyboards/planck/rev7/matrix.c
@@ -15,11 +15,10 @@
* along with this program. If not, see .
*/
-#include "gpio.h"
-#include "hal_pal.h"
-#include "hal_pal_lld.h"
-#include "quantum.h"
+#include "matrix.h"
+#include
#include
+#include "wait.h"
// STM32-specific watchdog config calculations
// timeout = 31.25us * PR * (RL + 1)
diff --git a/keyboards/preonic/rev3_drop/matrix.c b/keyboards/preonic/rev3_drop/matrix.c
index 60718caaba..1d9ab5e811 100644
--- a/keyboards/preonic/rev3_drop/matrix.c
+++ b/keyboards/preonic/rev3_drop/matrix.c
@@ -15,7 +15,10 @@
* along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
+#include "debug.h"
+#include "timer.h"
+#include "wait.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5
diff --git a/keyboards/qvex/lynepad2/matrix.c b/keyboards/qvex/lynepad2/matrix.c
index 878ee6e2f7..89c56b8d40 100644
--- a/keyboards/qvex/lynepad2/matrix.c
+++ b/keyboards/qvex/lynepad2/matrix.c
@@ -14,13 +14,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
-#include
-#include "util.h"
#include "matrix.h"
-#include "debounce.h"
-#include "quantum.h"
+#include "wait.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
diff --git a/keyboards/rate/pistachio_pro/matrix.c b/keyboards/rate/pistachio_pro/matrix.c
index 6cbfb6dfea..bb962c76e2 100644
--- a/keyboards/rate/pistachio_pro/matrix.c
+++ b/keyboards/rate/pistachio_pro/matrix.c
@@ -14,10 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "matrix.h"
-#include "quantum.h"
+#include "atomic_util.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
diff --git a/keyboards/redox/wireless/matrix.c b/keyboards/redox/wireless/matrix.c
index 9c50c9cece..92960b916d 100644
--- a/keyboards/redox/wireless/matrix.c
+++ b/keyboards/redox/wireless/matrix.c
@@ -14,7 +14,6 @@
* along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "uart.h"
diff --git a/keyboards/redscarf_iiplus/verb/matrix.c b/keyboards/redscarf_iiplus/verb/matrix.c
index aa2cd8e510..391a923f16 100755
--- a/keyboards/redscarf_iiplus/verb/matrix.c
+++ b/keyboards/redscarf_iiplus/verb/matrix.c
@@ -14,15 +14,12 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")
diff --git a/keyboards/redscarf_iiplus/verc/matrix.c b/keyboards/redscarf_iiplus/verc/matrix.c
index aa2cd8e510..391a923f16 100755
--- a/keyboards/redscarf_iiplus/verc/matrix.c
+++ b/keyboards/redscarf_iiplus/verc/matrix.c
@@ -14,15 +14,12 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")
diff --git a/keyboards/redscarf_iiplus/verd/matrix.c b/keyboards/redscarf_iiplus/verd/matrix.c
index 382847e941..b2046db2ce 100644
--- a/keyboards/redscarf_iiplus/verd/matrix.c
+++ b/keyboards/redscarf_iiplus/verd/matrix.c
@@ -14,15 +14,12 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")
diff --git a/keyboards/ryanskidmore/rskeys100/matrix.c b/keyboards/ryanskidmore/rskeys100/matrix.c
index faefb29c84..2ab9eafd7f 100644
--- a/keyboards/ryanskidmore/rskeys100/matrix.c
+++ b/keyboards/ryanskidmore/rskeys100/matrix.c
@@ -17,10 +17,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
#include "matrix.h"
#include
-#include "quantum.h"
static const uint32_t col_values[24] = SHR_COLS;
diff --git a/keyboards/satt/comet46/matrix.c b/keyboards/satt/comet46/matrix.c
index 9a69724eb7..15a29c5a86 100644
--- a/keyboards/satt/comet46/matrix.c
+++ b/keyboards/satt/comet46/matrix.c
@@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "uart.h"
diff --git a/keyboards/sirius/uni660/rev1/matrix.c b/keyboards/sirius/uni660/rev1/matrix.c
index f65bf0f26a..3fe3563c21 100644
--- a/keyboards/sirius/uni660/rev1/matrix.c
+++ b/keyboards/sirius/uni660/rev1/matrix.c
@@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "uart.h"
diff --git a/keyboards/sirius/uni660/rev2/matrix.c b/keyboards/sirius/uni660/rev2/matrix.c
index f65bf0f26a..3fe3563c21 100644
--- a/keyboards/sirius/uni660/rev2/matrix.c
+++ b/keyboards/sirius/uni660/rev2/matrix.c
@@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "uart.h"
diff --git a/keyboards/spiderisland/split78/matrix.c b/keyboards/spiderisland/split78/matrix.c
index 31ee29eaab..23b3745351 100644
--- a/keyboards/spiderisland/split78/matrix.c
+++ b/keyboards/spiderisland/split78/matrix.c
@@ -15,9 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
-#include "quantum.h"
+#include "matrix.h"
#include "i2c_master.h"
#define RIGHT_HALF
diff --git a/keyboards/sthlmkb/lagom/matrix.c b/keyboards/sthlmkb/lagom/matrix.c
index d3dc0cb12a..6a16722ad0 100644
--- a/keyboards/sthlmkb/lagom/matrix.c
+++ b/keyboards/sthlmkb/lagom/matrix.c
@@ -13,7 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include "quantum.h"
+#include "matrix.h"
+#include "wait.h"
#define COL_SHIFTER ((uint32_t)1)
diff --git a/keyboards/switchplate/southpaw_65/matrix.c b/keyboards/switchplate/southpaw_65/matrix.c
index a7008e9c7d..059934bf44 100644
--- a/keyboards/switchplate/southpaw_65/matrix.c
+++ b/keyboards/switchplate/southpaw_65/matrix.c
@@ -13,15 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include
-#include
-#include
-#include
#include "matrix.h"
#include "pca9555.h"
-#include "quantum.h"
-
-#include "debug.h"
// PCA9555 slave addresses
#define IC1 0x20
diff --git a/keyboards/telophase/matrix.c b/keyboards/telophase/matrix.c
index a18a2b20ed..c74ba0d7c7 100644
--- a/keyboards/telophase/matrix.c
+++ b/keyboards/telophase/matrix.c
@@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include "quantum.h"
#include "matrix.h"
#include "uart.h"
diff --git a/keyboards/touchpad/matrix.c b/keyboards/touchpad/matrix.c
index 87944cb7cc..7929e0969b 100644
--- a/keyboards/touchpad/matrix.c
+++ b/keyboards/touchpad/matrix.c
@@ -23,7 +23,8 @@ SOFTWARE.
#include "matrix.h"
#include "i2c_master.h"
-#include "quantum.h"
+#include "print.h"
+#include
#define VIBRATE_LENGTH 50 //Defines number of interrupts motor will vibrate for, must be bigger than 8 for correct operation
volatile uint8_t vibrate = 0; //Trigger vibration in interrupt
@@ -276,16 +277,16 @@ matrix_row_t matrix_get_row(uint8_t row) {
}
void matrix_print(void) {
- printf("\nr/c 01234567\n");
+ xprintf("\nr/c 01234567\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- printf("%X0: ", row);
+ xprintf("%X0: ", row);
matrix_row_t data = matrix_get_row(row);
for (int col = 0; col < MATRIX_COLS; col++) {
if (data & (1<.
*/
+#include "matrix.h"
#include "mcp23018.h"
-#include "quantum.h"
+#include "print.h"
+#include "wait.h"
// Optimize scanning code for speed as a slight mitigation for the port expander
#pragma GCC push_options
diff --git a/keyboards/xiudi/xd84/matrix.c b/keyboards/xiudi/xd84/matrix.c
index d92ac83b4a..ea1b4f55b4 100644
--- a/keyboards/xiudi/xd84/matrix.c
+++ b/keyboards/xiudi/xd84/matrix.c
@@ -13,15 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include
-#include
-#include
-#include
#include "matrix.h"
#include "pca9555.h"
-#include "quantum.h"
-
-#include "debug.h"
// PCA9555 slave addresses
#define IC1 0x20
diff --git a/keyboards/xiudi/xd96/matrix.c b/keyboards/xiudi/xd96/matrix.c
index 641202ca2c..2c433f02b8 100644
--- a/keyboards/xiudi/xd96/matrix.c
+++ b/keyboards/xiudi/xd96/matrix.c
@@ -13,15 +13,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include
-#include
-#include
-#include
#include "matrix.h"
#include "pca9555.h"
-#include "quantum.h"
-
-#include "debug.h"
+#include "wait.h"
// PCA9555 slave addresses
#define IC1 0x20
diff --git a/keyboards/ydkb/grape/matrix.c b/keyboards/ydkb/grape/matrix.c
index 700761fa44..3e070f8d7d 100644
--- a/keyboards/ydkb/grape/matrix.c
+++ b/keyboards/ydkb/grape/matrix.c
@@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
#include "matrix.h"
-#include "quantum.h"
#include "sn74x138.h"
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
diff --git a/keyboards/yiancardesigns/barleycorn/matrix.c b/keyboards/yiancardesigns/barleycorn/matrix.c
index 9ef2926566..008f096266 100644
--- a/keyboards/yiancardesigns/barleycorn/matrix.c
+++ b/keyboards/yiancardesigns/barleycorn/matrix.c
@@ -14,10 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
+#include "matrix.h"
#include "wait.h"
-#include "quantum.h"
#include "i2c_master.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
diff --git a/keyboards/yiancardesigns/gingham/matrix.c b/keyboards/yiancardesigns/gingham/matrix.c
index d17518b494..4e6319b52b 100644
--- a/keyboards/yiancardesigns/gingham/matrix.c
+++ b/keyboards/yiancardesigns/gingham/matrix.c
@@ -14,10 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
+#include "matrix.h"
#include "wait.h"
-#include "quantum.h"
#include "i2c_master.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
diff --git a/keyboards/yiancardesigns/seigaiha/matrix.c b/keyboards/yiancardesigns/seigaiha/matrix.c
index 55ee239db4..dc80c4becf 100644
--- a/keyboards/yiancardesigns/seigaiha/matrix.c
+++ b/keyboards/yiancardesigns/seigaiha/matrix.c
@@ -14,10 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#include
-#include
+#include "matrix.h"
#include "wait.h"
-#include "quantum.h"
#include "i2c_master.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;