X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fmatrix.h;h=cee3593eee4e656504fe82abea111165b40f1517;hb=790dab27b6b515327e9f543d56b6233eeeba9e9a;hp=5f380aaaba003d98a8aacd211f7f912914bb223b;hpb=aaa758f1d3f97dda39879f2b055ad2da9680adfe;p=qmk_firmware.git
diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h
index 5f380aaab..cee3593ee 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<