summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-07-09 11:05:20 +1000
committerGitHub <noreply@github.com>2023-07-09 02:05:20 +0100
commit7457e90887acecc6aea82a4ca738dd85cb25d939 (patch)
tree1079b0446f66fedb59056b6b0aa77047b845726a /quantum
parent333f4cb394ccfe73945ad3c79071c9bde0c50b48 (diff)
debounce: remove direct `quantum.h` includes (#21480)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/debounce.h4
-rw-r--r--quantum/debounce/asym_eager_defer_pk.c3
-rw-r--r--quantum/debounce/none.c4
-rw-r--r--quantum/debounce/sym_defer_g.c3
-rw-r--r--quantum/debounce/sym_defer_pk.c3
-rw-r--r--quantum/debounce/sym_defer_pr.c3
-rw-r--r--quantum/debounce/sym_eager_pk.c3
-rw-r--r--quantum/debounce/sym_eager_pr.c3
-rw-r--r--quantum/debounce/tests/debounce_test_common.cpp3
-rw-r--r--quantum/debounce/tests/debounce_test_common.h2
10 files changed, 13 insertions, 18 deletions
diff --git a/quantum/debounce.h b/quantum/debounce.h
index a8629654c2..cea1f2b526 100644
--- a/quantum/debounce.h
+++ b/quantum/debounce.h
@@ -1,5 +1,9 @@
#pragma once
+#include <stdint.h>
+#include <stdbool.h>
+#include "matrix.h"
+
/**
* @brief Debounce raw matrix events according to the choosen debounce algorithm.
*
diff --git a/quantum/debounce/asym_eager_defer_pk.c b/quantum/debounce/asym_eager_defer_pk.c
index 0f7640a80c..954d43536c 100644
--- a/quantum/debounce/asym_eager_defer_pk.c
+++ b/quantum/debounce/asym_eager_defer_pk.c
@@ -22,9 +22,8 @@ Basic symmetric per-key algorithm. Uses an 8-bit counter per key.
When no state changes have occured for DEBOUNCE milliseconds, we push the state.
*/
-#include "matrix.h"
+#include "debounce.h"
#include "timer.h"
-#include "quantum.h"
#include <stdlib.h>
#ifdef PROTOCOL_CHIBIOS
diff --git a/quantum/debounce/none.c b/quantum/debounce/none.c
index 4cff5e05e2..1b8b1dc13a 100644
--- a/quantum/debounce/none.c
+++ b/quantum/debounce/none.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "matrix.h"
-#include "quantum.h"
-#include <stdlib.h>
+#include "debounce.h"
#include <string.h>
void debounce_init(uint8_t num_rows) {}
diff --git a/quantum/debounce/sym_defer_g.c b/quantum/debounce/sym_defer_g.c
index d04310a761..25e18890af 100644
--- a/quantum/debounce/sym_defer_g.c
+++ b/quantum/debounce/sym_defer_g.c
@@ -17,9 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Basic global debounce algorithm. Used in 99% of keyboards at time of implementation
When no state changes have occured for DEBOUNCE milliseconds, we push the state.
*/
-#include "matrix.h"
+#include "debounce.h"
#include "timer.h"
-#include "quantum.h"
#include <string.h>
#ifndef DEBOUNCE
# define DEBOUNCE 5
diff --git a/quantum/debounce/sym_defer_pk.c b/quantum/debounce/sym_defer_pk.c
index 7b59b5e100..156535a373 100644
--- a/quantum/debounce/sym_defer_pk.c
+++ b/quantum/debounce/sym_defer_pk.c
@@ -19,9 +19,8 @@ Basic symmetric per-key algorithm. Uses an 8-bit counter per key.
When no state changes have occured for DEBOUNCE milliseconds, we push the state.
*/
-#include "matrix.h"
+#include "debounce.h"
#include "timer.h"
-#include "quantum.h"
#include <stdlib.h>
#ifdef PROTOCOL_CHIBIOS
diff --git a/quantum/debounce/sym_defer_pr.c b/quantum/debounce/sym_defer_pr.c
index 452c4599d0..d6222af5b2 100644
--- a/quantum/debounce/sym_defer_pr.c
+++ b/quantum/debounce/sym_defer_pr.c
@@ -17,9 +17,8 @@ Symmetric per-row debounce algorithm. Changes only apply when
DEBOUNCE milliseconds have elapsed since the last change.
*/
-#include "matrix.h"
+#include "debounce.h"
#include "timer.h"
-#include "quantum.h"
#include <stdlib.h>
#ifndef DEBOUNCE
diff --git a/quantum/debounce/sym_eager_pk.c b/quantum/debounce/sym_eager_pk.c
index 15360441de..b359e79287 100644
--- a/quantum/debounce/sym_eager_pk.c
+++ b/quantum/debounce/sym_eager_pk.c
@@ -19,9 +19,8 @@ After pressing a key, it immediately changes state, and sets a counter.
No further inputs are accepted until DEBOUNCE milliseconds have occurred.
*/
-#include "matrix.h"
+#include "debounce.h"
#include "timer.h"
-#include "quantum.h"
#include <stdlib.h>
#ifdef PROTOCOL_CHIBIOS
diff --git a/quantum/debounce/sym_eager_pr.c b/quantum/debounce/sym_eager_pr.c
index 84f897d674..ccc5d20fa2 100644
--- a/quantum/debounce/sym_eager_pr.c
+++ b/quantum/debounce/sym_eager_pr.c
@@ -19,9 +19,8 @@ After pressing a key, it immediately changes state, and sets a counter.
No further inputs are accepted until DEBOUNCE milliseconds have occurred.
*/
-#include "matrix.h"
+#include "debounce.h"
#include "timer.h"
-#include "quantum.h"
#include <stdlib.h>
#ifdef PROTOCOL_CHIBIOS
diff --git a/quantum/debounce/tests/debounce_test_common.cpp b/quantum/debounce/tests/debounce_test_common.cpp
index bd98e32955..b11378b286 100644
--- a/quantum/debounce/tests/debounce_test_common.cpp
+++ b/quantum/debounce/tests/debounce_test_common.cpp
@@ -23,9 +23,8 @@
#include <sstream>
extern "C" {
-#include "quantum.h"
-#include "timer.h"
#include "debounce.h"
+#include "timer.h"
void set_time(uint32_t t);
void advance_time(uint32_t ms);
diff --git a/quantum/debounce/tests/debounce_test_common.h b/quantum/debounce/tests/debounce_test_common.h
index b7becb3782..7319abfbf3 100644
--- a/quantum/debounce/tests/debounce_test_common.h
+++ b/quantum/debounce/tests/debounce_test_common.h
@@ -21,7 +21,7 @@
#include <string>
extern "C" {
-#include "quantum.h"
+#include "matrix.h"
#include "timer.h"
}