diff --git a/keyboards/barleycorn_smd/matrix.c b/keyboards/barleycorn_smd/matrix.c
index 315093c8a98..d8880364b66 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 b0ad6075554..802d365cb89 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 0218adf39b4..387d31ee076 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 ea1aa2287e0..78054ee0fac 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 99a23a4542e..99c3428d802 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 04a6d03804e..f9b67381455 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 e32c9a58f94..22156745f17 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 c82d5dd9994..f392b9b1909 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 60a1ea235a8..ae4bb6cb3a3 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 f30ea3355a1..d392a31d7c7 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 ebc10e2e5ad..98796133f12 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 1a97fdfd614..af13768b08e 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 1a97fdfd614..af13768b08e 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 1a97fdfd614..af13768b08e 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 32d7b09310a..47c3c61e27f 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 9a69724eb78..15a29c5a865 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 9a69724eb78..15a29c5a865 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 32d7b09310a..47c3c61e27f 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 99adb38f184..68d4ab65242 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 fd18fd27bda..99598dc1b78 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 d93dd853b6a..398f961aa5f 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 bbcf697a594..3f241e8973d 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 8a303714cf0..22d92dd99a1 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 2bc97bd9e81..3acbdfbeda6 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 496bebd58f9..8a56a927c15 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 f0eccc899dc..c82c77bed34 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 d493a7e9ef6..69ae6ab7b78 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 361803edec4..85df5e5d6fa 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 efcd7043e64..445c1acdc07 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 efcd7043e64..445c1acdc07 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 4f32070e66e..0fe1d41dad8 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 6228125d923..e506916f389 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 7abc50005b6..5d731b10683 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 7abc50005b6..5d731b10683 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 02421551da5..4547f1a0479 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 7abc50005b6..5d731b10683 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 65698670325..1843d19fd29 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 476e40f5144..ad7919e33cf 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 4b788d28128..20359ca9718 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 5065f97aa7d..8c954c73d08 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 5c035b0e42e..2c2d2ccc378 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 8229517fd9c..cf8361bd23e 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 d008a793841..2bdf4bdec7b 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 26830780ffe..188156789b3 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 28ef877504a..4809b20677c 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 11f3432e6b1..c59b229cfa6 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 5785f5d5709..206e3012267 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 82a883834f8..7b9136d4904 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 9269fed8d66..87cda1774ad 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 44a1676afa9..c0c39d5b5fd 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 ced84428818..fc3a1c4c2c4 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 9269fed8d66..87cda1774ad 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 d6ea67da681..4e4ca6f55cc 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 d8d87b7d895..d74ed957751 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 9c36153da10..c127aa35b90 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 e9ddbdff62b..85f5863725b 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 90e7006b785..14e8188cb58 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 b1b0d20654c..62a56f687cb 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 b1b0d20654c..62a56f687cb 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 c01879c9a54..2abda55d0e8 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 b1b0d20654c..62a56f687cb 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 338286a7db6..5d27ec683fa 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 841ff3c16e6..ab252f919b2 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 e5389bb113d..f122b989570 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 8c9b6214dba..1cb9590e9f9 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 196a543faaf..df5e9c056b5 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 496c5dbe322..6508b704e9c 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 ceb9cd89841..3cd3f5c37e3 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 8b054ccbe04..36d4d3d353a 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 36867804689..b0e252ec458 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 5023024b8b5..bcc88f7aa99 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 e31e473ae25..d1403567388 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 350ce93ce04..8cadfa5e8d5 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 60718caaba8..1d9ab5e8118 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 878ee6e2f72..89c56b8d406 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 6cbfb6dfea1..bb962c76e22 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 9c50c9cecea..92960b916df 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 aa2cd8e5107..391a923f165 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 aa2cd8e5107..391a923f165 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 382847e9419..b2046db2cef 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 faefb29c84e..2ab9eafd7f5 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 9a69724eb78..15a29c5a865 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 f65bf0f26a0..3fe3563c211 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 f65bf0f26a0..3fe3563c211 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 31ee29eaab6..23b37453517 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 d3dc0cb12aa..6a16722ad08 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 a7008e9c7d0..059934bf441 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 a18a2b20edd..c74ba0d7c70 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 87944cb7cc6..7929e0969b5 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 d92ac83b4a7..ea1b4f55b40 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 641202ca2c9..2c433f02b8a 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 700761fa448..3e070f8d7d5 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 9ef29265662..008f096266d 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 d17518b4940..4e6319b52bc 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 55ee239db4c..dc80c4becf9 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;