summaryrefslogtreecommitdiffstats
path: root/quantum/debounce.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/debounce.c')
-rw-r--r--quantum/debounce.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/quantum/debounce.c b/quantum/debounce.c
deleted file mode 100644
index 929023ab2d..0000000000
--- 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