diff --git a/keyboard/kimera/kimera.c b/keyboard/kimera/kimera.c index 7082ab42..66fbeeb6 100644 --- a/keyboard/kimera/kimera.c +++ b/keyboard/kimera/kimera.c @@ -84,7 +84,8 @@ static uint8_t col_left_count = 16; static matrix_row_t col_left_mask; #endif static uint8_t data[EXP_COUNT][EXP_PORT_COUNT]; -static uint8_t exp_status = 0; +static uint8_t exp_in_use = 0; +static uint8_t exp_online = 0; static uint8_t read_matrix_mapping(void); static void write_matrix_mapping(void); @@ -146,10 +147,17 @@ uint8_t read_matrix_mapping(void) /* read row mapping */ uint8_t *mapping = EECONFIG_ROW_COL_MAPPING; + uint8_t exp; for (uint8_t i = 0; i < PX_COUNT; i++) { if (i < row_count) { row_mapping[i] = eeprom_read_byte(mapping++); - if (row_mapping[i] >= PX_COUNT) error++; + if (row_mapping[i] >= PX_COUNT) { + error++; + } + else { + exp = PX_TO_EXP(row_mapping[i]); + exp_in_use |= (1<= PX_COUNT) error++; + if (col_mapping[i] >= PX_COUNT) { + error++; + } + else { + exp = PX_TO_EXP(col_mapping[i]); + exp_in_use |= (1<