X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fmatrix.h;h=e5665bf40a3f52baabfdd8a36d0ef89baf75fa01;hb=4665e4ffffcdfc6fe6f498928963adc64f6fefd7;hp=0b013fc989aedd8a10a2a50c9f2f9c7b7a61a74a;hpb=8b883c797fc043def3abe5c367cb9d9a6f11f8fb;p=qmk_firmware.git diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index 0b013fc98..e5665bf40 100644 --- a/tmk_core/common/matrix.h +++ b/tmk_core/common/matrix.h @@ -14,7 +14,6 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ - #ifndef MATRIX_H #define MATRIX_H @@ -32,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<