X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fmatrix.h;h=e5665bf40a3f52baabfdd8a36d0ef89baf75fa01;hb=0284431ad935b05fad212fb3925e8104007ab93f;hp=71153a5f58370831f4a675d5ff17c3d885713f38;hpb=a5fb2b58a5fc328da7eea42cb73c668f3b5d0f7e;p=qmk_firmware.git diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index 71153a5f5..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<