diff options
| author | alex-ong <the.onga@gmail.com> | 2019-01-26 17:10:27 +1100 |
|---|---|---|
| committer | alex-ong <the.onga@gmail.com> | 2019-01-26 17:10:27 +1100 |
| commit | 123608fb318a42500d64d29aa46c7d08140033fd (patch) | |
| tree | 034040c60d2f5a5b768e4ada990c08aa195951c5 /quantum/debounce | |
| parent | d0b691df0ee74863ca54ca697aa4d4212cf401a7 (diff) | |
| download | qmk_firmware-123608fb318a42500d64d29aa46c7d08140033fd.tar.gz qmk_firmware-123608fb318a42500d64d29aa46c7d08140033fd.zip | |
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.c | 8 |
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. | |||
| 26 | static bool debouncing = false; | 26 | static bool debouncing = false; |
| 27 | static uint16_t debouncing_time; | 27 | static uint16_t debouncing_time; |
| 28 | 28 | ||
| 29 | void debounce_init(void) {} | 29 | void debounce_init(uint8_t num_rows) {} |
| 30 | 30 | ||
| 31 | #if DEBOUNCE > 0 | 31 | #if DEBOUNCE > 0 |
| 32 | void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) | 32 | void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) |
| 33 | { | 33 | { |
| 34 | if (changed) { | 34 | if (changed) { |
| 35 | debouncing = true; | 35 | debouncing = true; |
| @@ -37,14 +37,14 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) | |||
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { | 39 | if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { |
| 40 | for (int i = 0; i < MATRIX_ROWS; i++) { | 40 | for (int i = 0; i < num_rows; i++) { |
| 41 | cooked[i] = raw[i]; | 41 | cooked[i] = raw[i]; |
| 42 | } | 42 | } |
| 43 | debouncing = false; | 43 | debouncing = false; |
| 44 | } | 44 | } |
| 45 | } | 45 | } |
| 46 | #else //no debouncing. | 46 | #else //no debouncing. |
| 47 | void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) | 47 | void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) |
| 48 | { | 48 | { |
| 49 | for (int i = 0; i < MATRIX_ROWS; i++) { | 49 | for (int i = 0; i < MATRIX_ROWS; i++) { |
| 50 | cooked[i] = raw[i]; | 50 | cooked[i] = raw[i]; |
