summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
authorIBNobody <protospherex@gmail.com>2016-10-28 21:21:38 +0200
committerIBNobody <protospherex@gmail.com>2016-10-28 21:21:38 +0200
commit508eddf8ba8548d3f71e1c09a404839beb49f45c (patch)
treef6791e63d391c82814219b6e9fa255c16d164e08 /tmk_core
parenta0fdb6b81aa33c493bc4fccab178fcbe02231578 (diff)
downloadqmk_firmware-508eddf8ba8548d3f71e1c09a404839beb49f45c.tar.gz
qmk_firmware-508eddf8ba8548d3f71e1c09a404839beb49f45c.tar.xz
Fixing Debounce - WIP
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/matrix.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h
index cee3593ee..84e066c67 100644
--- a/tmk_core/common/matrix.h
+++ b/tmk_core/common/matrix.h
@@ -31,6 +31,16 @@ typedef uint32_t matrix_row_t;
#error "MATRIX_COLS: invalid value"
#endif
+#if (MATRIX_ROWS <= 8)
+typedef uint8_t matrix_col_t;
+#elif (MATRIX_ROWS <= 16)
+typedef uint16_t matrix_col_t;
+#elif (MATRIX_ROWS <= 32)
+typedef uint32_t matrix_col_t;
+#else
+#error "MATRIX_COLS: invalid value"
+#endif
+
#define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<<col))