summaryrefslogtreecommitdiffstats
path: root/quantum/debounce
diff options
context:
space:
mode:
authoralex-ong <the.onga@gmail.com>2019-01-26 07:10:27 +0100
committeralex-ong <the.onga@gmail.com>2019-01-26 07:10:27 +0100
commit123608fb318a42500d64d29aa46c7d08140033fd (patch)
tree034040c60d2f5a5b768e4ada990c08aa195951c5 /quantum/debounce
parentd0b691df0ee74863ca54ca697aa4d4212cf401a7 (diff)
downloadqmk_firmware-123608fb318a42500d64d29aa46c7d08140033fd.tar.gz
qmk_firmware-123608fb318a42500d64d29aa46c7d08140033fd.tar.xz
DO NOT USE Revert back to original API to support split_keyboards.
Diffstat (limited to 'quantum/debounce')
-rw-r--r--quantum/debounce/debounce_sym_g.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/quantum/debounce/debounce_sym_g.c b/quantum/debounce/debounce_sym_g.c
index c206f2864..4a6996c73 100644
--- a/quantum/debounce/debounce_sym_g.c
+++ b/quantum/debounce/debounce_sym_g.c
@@ -26,10 +26,10 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state.
static bool debouncing = false;
static uint16_t debouncing_time;
-void debounce_init(void) {}
+void debounce_init(uint8_t num_rows) {}
#if DEBOUNCE > 0
-void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed)
+void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed)
{
if (changed) {
debouncing = true;
@@ -37,14 +37,14 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed)
}
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
- for (int i = 0; i < MATRIX_ROWS; i++) {
+ for (int i = 0; i < num_rows; i++) {
cooked[i] = raw[i];
}
debouncing = false;
}
}
#else //no debouncing.
-void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed)
+void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed)
{
for (int i = 0; i < MATRIX_ROWS; i++) {
cooked[i] = raw[i];