From 0284431ad935b05fad212fb3925e8104007ab93f Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 19 Jul 2018 23:56:47 -0400 Subject: [PATCH] add col type defines --- tmk_core/common/matrix.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index 2543f5abc..e5665bf40 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_ROWS: invalid value" +#endif + #define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<