From 8e88d55bfd7c88cb15845e0c6415e4e892532861 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 4 Jul 2016 11:45:58 -0400 Subject: reverts #343 for the most part (#474) --- tmk_core/common/matrix.h | 57 +++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 34 deletions(-) (limited to 'tmk_core/common/matrix.h') diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index 5f2f831b45..71153a5f58 100644 --- a/tmk_core/common/matrix.h +++ b/tmk_core/common/matrix.h @@ -20,59 +20,48 @@ 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< Date: Tue, 5 Jul 2016 23:27:10 -0400 Subject: i2c working --- tmk_core/common/matrix.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tmk_core/common/matrix.h') diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index 71153a5f58..cee3593eee 100644 --- a/tmk_core/common/matrix.h +++ b/tmk_core/common/matrix.h @@ -72,6 +72,11 @@ void matrix_scan_kb(void); void matrix_init_user(void); void matrix_scan_user(void); +#ifdef I2C_SPLIT + void slave_matrix_init(void); + uint8_t slave_matrix_scan(void); +#endif + #ifdef __cplusplus } #endif -- cgit v1.2.3