summaryrefslogtreecommitdiff
path: root/quantum/debounce.h
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2022-08-28 14:23:01 +1000
committerNick Brassel <nick@tzarc.org>2022-08-28 14:23:01 +1000
commit0a3f7e48690bb2b7b008300a54554979a55be19a (patch)
tree7499d52f20040ed7d5a56496ecb81ed114f80719 /quantum/debounce.h
parentfc0bf67f372c38f72c303cdec21b1d4afb5e8cb4 (diff)
parent9b5b0722555891ba94f240760ef3a6d4c870fd13 (diff)
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'quantum/debounce.h')
-rw-r--r--quantum/debounce.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/quantum/debounce.h b/quantum/debounce.h
index 3532d9cd7b..a8629654c2 100644
--- a/quantum/debounce.h
+++ b/quantum/debounce.h
@@ -1,10 +1,16 @@
#pragma once
-// raw is the current key state
-// on entry cooked is the previous debounced state
-// on exit cooked is the current debounced state
-// changed is true if raw has changed since the last call
-void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed);
+/**
+ * @brief Debounce raw matrix events according to the choosen debounce algorithm.
+ *
+ * @param raw The current key state
+ * @param cooked The debounced key state
+ * @param num_rows Number of rows to debounce
+ * @param changed True if raw has changed since the last call
+ * @return true Cooked has new keychanges after debouncing
+ * @return false Cooked is the same as before
+ */
+bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed);
void debounce_init(uint8_t num_rows);