From d0b691df0ee74863ca54ca697aa4d4212cf401a7 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 17:03:46 +1100 Subject: DO NOT USE - debounce successfully compiled. --- quantum/debounce.c | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 quantum/debounce.c (limited to 'quantum/debounce.c') diff --git a/quantum/debounce.c b/quantum/debounce.c deleted file mode 100644 index 929023ab2..000000000 --- a/quantum/debounce.c +++ /dev/null @@ -1,52 +0,0 @@ - -#include "matrix.h" -#include "timer.h" -#include "quantum.h" - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - -void debounce_init(uint8_t num_rows) { -} - -#if DEBOUNCING_DELAY > 0 - -static bool debouncing = false; - -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - static uint16_t debouncing_time; - - if (changed) { - debouncing = true; - debouncing_time = timer_read(); - } - - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { - for (uint8_t i = 0; i < num_rows; i++) { - cooked[i] = raw[i]; - } - debouncing = false; - } -} - -bool debounce_active(void) { - return debouncing; -} - -#else - -// no debounce -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - if (changed) - { - for (uint8_t i = 0; i < num_rows; i++) { - cooked[i] = raw[i]; - } - } -} - -bool debounce_active(void) { - return false; -} -#endif -- cgit v1.2.3-24-g4f1b