Browse Source

debounce: remove direct `quantum.h` includes (#21480)

pull/21485/head
Ryan 9 months ago
committed by GitHub
parent
commit
7457e90887
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 13 additions and 18 deletions
  1. +4
    -0
      quantum/debounce.h
  2. +1
    -2
      quantum/debounce/asym_eager_defer_pk.c
  3. +1
    -3
      quantum/debounce/none.c
  4. +1
    -2
      quantum/debounce/sym_defer_g.c
  5. +1
    -2
      quantum/debounce/sym_defer_pk.c
  6. +1
    -2
      quantum/debounce/sym_defer_pr.c
  7. +1
    -2
      quantum/debounce/sym_eager_pk.c
  8. +1
    -2
      quantum/debounce/sym_eager_pr.c
  9. +1
    -2
      quantum/debounce/tests/debounce_test_common.cpp
  10. +1
    -1
      quantum/debounce/tests/debounce_test_common.h

+ 4
- 0
quantum/debounce.h View File

@ -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.
*


+ 1
- 2
quantum/debounce/asym_eager_defer_pk.c View File

@ -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


+ 1
- 3
quantum/debounce/none.c View File

@ -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) {}


+ 1
- 2
quantum/debounce/sym_defer_g.c View File

@ -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


+ 1
- 2
quantum/debounce/sym_defer_pk.c View File

@ -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


+ 1
- 2
quantum/debounce/sym_defer_pr.c View File

@ -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


+ 1
- 2
quantum/debounce/sym_eager_pk.c View File

@ -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


+ 1
- 2
quantum/debounce/sym_eager_pr.c View File

@ -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


+ 1
- 2
quantum/debounce/tests/debounce_test_common.cpp View File

@ -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);


+ 1
- 1
quantum/debounce/tests/debounce_test_common.h View File

@ -21,7 +21,7 @@
#include <string>
extern "C" {
#include "quantum.h"
#include "matrix.h"
#include "timer.h"
}


Loading…
Cancel
Save