From d5e622b979c54ddc8f9ad97116c302e29c6aed12 Mon Sep 17 00:00:00 2001 From: jack <0x6A73@pm.me> Date: Sun, 5 Feb 2023 14:36:01 -0700 Subject: [PATCH] Remove `DEBOUNCE` macro usage (#19750) --- keyboards/baguette/baguette.c | 4 ++++ keyboards/bpiphany/pegasushoof/2013/matrix.c | 4 ++++ keyboards/dp60/matrix.c | 4 ++++ keyboards/duck/eagle_viper/v2/matrix.c | 4 ++++ keyboards/duck/jetfire/matrix.c | 4 ++++ keyboards/duck/lightsaver/matrix.c | 4 ++++ keyboards/duck/octagon/v1/matrix.c | 4 ++++ keyboards/duck/octagon/v2/matrix.c | 4 ++++ keyboards/duck/orion/v3/matrix.c | 4 ++++ keyboards/duck/tcv3/matrix.c | 6 +++++- keyboards/hs60/v1/v1.c | 4 ++++ keyboards/matrix/noah/matrix.c | 4 ++++ keyboards/planck/rev6_drop/matrix.c | 4 ++++ keyboards/preonic/rev3_drop/matrix.c | 4 ++++ 14 files changed, 57 insertions(+), 1 deletion(-) diff --git a/keyboards/baguette/baguette.c b/keyboards/baguette/baguette.c index 99305cf2deba..42c8435b66ea 100644 --- a/keyboards/baguette/baguette.c +++ b/keyboards/baguette/baguette.c @@ -15,6 +15,10 @@ */ #include "baguette.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + void bootmagic_lite(void) { // The lite version of TMK's bootmagic made by Wilba. diff --git a/keyboards/bpiphany/pegasushoof/2013/matrix.c b/keyboards/bpiphany/pegasushoof/2013/matrix.c index ed56067dca66..3250e71fe678 100644 --- a/keyboards/bpiphany/pegasushoof/2013/matrix.c +++ b/keyboards/bpiphany/pegasushoof/2013/matrix.c @@ -26,6 +26,10 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; diff --git a/keyboards/dp60/matrix.c b/keyboards/dp60/matrix.c index dbcc68056d4c..1803e0f94fad 100644 --- a/keyboards/dp60/matrix.c +++ b/keyboards/dp60/matrix.c @@ -15,6 +15,10 @@ */ #include "quantum.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; diff --git a/keyboards/duck/eagle_viper/v2/matrix.c b/keyboards/duck/eagle_viper/v2/matrix.c index 0964493ac6c3..a673c536c248 100644 --- a/keyboards/duck/eagle_viper/v2/matrix.c +++ b/keyboards/duck/eagle_viper/v2/matrix.c @@ -22,6 +22,10 @@ along with this program. If not, see . #include "print.h" #include "debug.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ diff --git a/keyboards/duck/jetfire/matrix.c b/keyboards/duck/jetfire/matrix.c index 2b64885842e2..762a98ae550c 100644 --- a/keyboards/duck/jetfire/matrix.c +++ b/keyboards/duck/jetfire/matrix.c @@ -21,6 +21,10 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ diff --git a/keyboards/duck/lightsaver/matrix.c b/keyboards/duck/lightsaver/matrix.c index c65b6aa6c453..48861e08febe 100644 --- a/keyboards/duck/lightsaver/matrix.c +++ b/keyboards/duck/lightsaver/matrix.c @@ -22,6 +22,10 @@ along with this program. If not, see . #include "print.h" #include "debug.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ diff --git a/keyboards/duck/octagon/v1/matrix.c b/keyboards/duck/octagon/v1/matrix.c index a2bea865bc3a..c903e619aa36 100644 --- a/keyboards/duck/octagon/v1/matrix.c +++ b/keyboards/duck/octagon/v1/matrix.c @@ -22,6 +22,10 @@ along with this program. If not, see . #include "print.h" #include "debug.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ diff --git a/keyboards/duck/octagon/v2/matrix.c b/keyboards/duck/octagon/v2/matrix.c index 25d1e45b0513..c70eb73747c9 100644 --- a/keyboards/duck/octagon/v2/matrix.c +++ b/keyboards/duck/octagon/v2/matrix.c @@ -22,6 +22,10 @@ along with this program. If not, see . #include "print.h" #include "debug.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ diff --git a/keyboards/duck/orion/v3/matrix.c b/keyboards/duck/orion/v3/matrix.c index 84673bd44f05..a5b522d78b2d 100644 --- a/keyboards/duck/orion/v3/matrix.c +++ b/keyboards/duck/orion/v3/matrix.c @@ -16,6 +16,10 @@ along with this program. If not, see . #include "quantum.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ diff --git a/keyboards/duck/tcv3/matrix.c b/keyboards/duck/tcv3/matrix.c index d2d90470a05f..cc4ebeb5dc39 100644 --- a/keyboards/duck/tcv3/matrix.c +++ b/keyboards/duck/tcv3/matrix.c @@ -22,6 +22,10 @@ along with this program. If not, see . #include "print.h" #include "debug.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ @@ -277,4 +281,4 @@ static void select_col(uint8_t col) { PORTB |= 0b00100000; break; } -} \ No newline at end of file +} diff --git a/keyboards/hs60/v1/v1.c b/keyboards/hs60/v1/v1.c index 466cfeeaf597..21d6ac48740c 100644 --- a/keyboards/hs60/v1/v1.c +++ b/keyboards/hs60/v1/v1.c @@ -307,6 +307,10 @@ led_config_t g_led_config = { { #endif +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + void bootmagic_lite(void) { // The lite version of TMK's bootmagic made by Wilba. diff --git a/keyboards/matrix/noah/matrix.c b/keyboards/matrix/noah/matrix.c index 17f7a2fb6236..d5aca79cf648 100644 --- a/keyboards/matrix/noah/matrix.c +++ b/keyboards/matrix/noah/matrix.c @@ -13,6 +13,10 @@ #include "print.h" #include "matrix.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + /** * * Row pins are input with internal pull-down. diff --git a/keyboards/planck/rev6_drop/matrix.c b/keyboards/planck/rev6_drop/matrix.c index d10d94dcf867..7eaaf053f8ea 100644 --- a/keyboards/planck/rev6_drop/matrix.c +++ b/keyboards/planck/rev6_drop/matrix.c @@ -17,6 +17,10 @@ #include "quantum.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + /* * col: { B11, B10, B2, B1, A7, B0 } * row: { A10, A9, A8, B15, C13, C14, C15, A2 } diff --git a/keyboards/preonic/rev3_drop/matrix.c b/keyboards/preonic/rev3_drop/matrix.c index 82214e03d93a..2477dfca1bc1 100644 --- a/keyboards/preonic/rev3_drop/matrix.c +++ b/keyboards/preonic/rev3_drop/matrix.c @@ -17,6 +17,10 @@ #include "quantum.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + typedef uint16_t matrix_col_t; /*