X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fmatrix.h;h=2543f5abce79af9cb7f8eef8ac99096a401fd030;hb=526eabb6f8be7d08d7ce61613c25983e88c1e65c;hp=5f380aaaba003d98a8aacd211f7f912914bb223b;hpb=48871b9b6b99201abc381ee27cfd94e211ca131a;p=qmk_firmware.git
diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h
index 5f380aaab..2543f5abc 100644
--- a/tmk_core/common/matrix.h
+++ b/tmk_core/common/matrix.h
@@ -20,62 +20,63 @@ along with this program. If not, see .
#include
#include
-#if MATRIX_COLS <= 8
-typedef uint8_t matrix_row_t;
-#elif MATRIX_COLS <= 16
-typedef uint16_t matrix_row_t;
-#elif MATRIX_COLS <= 32
-typedef uint32_t matrix_row_t;
+
+#if (MATRIX_COLS <= 8)
+typedef uint8_t matrix_row_t;
+#elif (MATRIX_COLS <= 16)
+typedef uint16_t matrix_row_t;
+#elif (MATRIX_COLS <= 32)
+typedef uint32_t matrix_row_t;
#else
-# error "There are too many columns."
+#error "MATRIX_COLS: invalid value"
#endif
-#if DIODE_DIRECTION == ROW2COL
-# 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 "There are too many rows."
-# endif
-#endif
+#define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<