add col type defines
This commit is contained in:
parent
8e86e22187
commit
0284431ad9
@ -31,6 +31,16 @@ typedef uint32_t matrix_row_t;
|
|||||||
#error "MATRIX_COLS: invalid value"
|
#error "MATRIX_COLS: invalid value"
|
||||||
#endif
|
#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))
|
#define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<<col))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user