Skip to content

Commit

Permalink
debounce: remove direct quantum.h includes (qmk#21480)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and akeep committed Oct 2, 2023
1 parent 21b98dc commit 373fba3
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 18 deletions.
4 changes: 4 additions & 0 deletions quantum/debounce.h
Original file line number Diff line number Diff line change
@@ -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.
*
Expand Down
3 changes: 1 addition & 2 deletions quantum/debounce/asym_eager_defer_pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions quantum/debounce/none.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down
3 changes: 1 addition & 2 deletions quantum/debounce/sym_defer_g.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions quantum/debounce/sym_defer_pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions quantum/debounce/sym_defer_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions quantum/debounce/sym_eager_pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions quantum/debounce/sym_eager_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions quantum/debounce/tests/debounce_test_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion quantum/debounce/tests/debounce_test_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <string>

extern "C" {
#include "quantum.h"
#include "matrix.h"
#include "timer.h"
}

Expand Down

0 comments on commit 373fba3

Please sign in to comment.