summaryrefslogtreecommitdiffstats
path: root/tmk_core/common/debounce.h
diff options
context:
space:
mode:
authorAlex Ong <alex.ong@unsw.edu.au>2018-08-29 10:19:36 +1000
committerAlex Ong <alex.ong@unsw.edu.au>2018-08-29 10:19:36 +1000
commit3cf7f7322c24e3cab21d402f1a859b60df857603 (patch)
tree08e5f119b2faa8c393dbbad7c085fe83728046c3 /tmk_core/common/debounce.h
parent9bd6d6112d698ea5823b268983809fe3b8d98b26 (diff)
Removed "debounce_algo = manual" in all keyboards with CUSTOM_MATRIX = yes.
Diffstat (limited to 'tmk_core/common/debounce.h')
-rw-r--r--tmk_core/common/debounce.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/tmk_core/common/debounce.h b/tmk_core/common/debounce.h
new file mode 100644
index 0000000000..fe3effab32
--- /dev/null
+++ b/tmk_core/common/debounce.h
@@ -0,0 +1,21 @@
+#ifndef DEBOUNCE_H
+#define DEBOUNCE_H
+#include <stdbool.h>
+#include <stdint.h>
+#include "matrix.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+ /* called to initialize any data stores your implementation has*/
+ void matrix_debounce_init(void);
+ /* call this every keyboard_task to debounce the matrix*/
+ void matrix_debounce(void);
+ /* matrix state on row */
+ matrix_row_t matrix_debounce_get_row(uint8_t row);
+ /* whether a switch is on */
+ bool matrix_debounce_is_on(uint8_t row, uint8_t col);
+
+#ifdef __cplusplus
+}
+#endif
+#endif