~ruther/qmk_firmware

0284431ad935b05fad212fb3925e8104007ab93f — Jack Humbert 7 years ago 8e86e22
add col type defines
1 files changed, 10 insertions(+), 0 deletions(-)

M tmk_core/common/matrix.h
M tmk_core/common/matrix.h => tmk_core/common/matrix.h +10 -0
@@ 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<<col))