X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fmatrix.h;h=e5665bf40a3f52baabfdd8a36d0ef89baf75fa01;hb=5aa4420f59907d4a6192b590fd5e9dfb1e295525;hp=5f2f831b4539280eeac60c598a168a6d4ce5ce3a;hpb=13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b;p=qmk_firmware.git
diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h
index 5f2f831b4..e5665bf40 100644
--- a/tmk_core/common/matrix.h
+++ b/tmk_core/common/matrix.h
@@ -20,59 +20,58 @@ 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
+#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
-typedef struct {
- uint8_t input_addr:4;
- uint8_t bit:4;
-} io_pin_t;
+#define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<