update skyloong/gk104/q1 keyboard dip switch define

This commit is contained in:
NaturalZh 2024-03-13 09:38:59 +08:00
parent 004542d6ad
commit 509fcdc65c
3 changed files with 5 additions and 4 deletions

View File

@ -9,8 +9,6 @@
# define ENCODER_MAP_KEY_DELAY 10
#endif
#define DIP_SWITCH_PINS {A4}
#ifdef RGB_MATRIX_ENABLE
# define AW20216S_CS_PIN_1 B12
# define AW20216S_CS_PIN_2 B11

View File

@ -33,6 +33,9 @@
"on_state": 1,
"caps_lock": "C14"
},
"dip_switch":{
"pins":["A4"]
},
"matrix_pins": {
"cols": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,null],
"rows": ["A8", "A9", "A10", "A15", "B6", "B7","B9"]

View File

@ -147,8 +147,8 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
matrix_read_rows_on_col(temp_matrix, current_col, row_shifter);
}
bool changed = memcmp(temp_matrix, current_matrix, sizeof(temp_matrix)) != 0;
if (changed) memcpy(temp_matrix, current_matrix, sizeof(temp_matrix));
bool changed = memcmp(raw_matrix, temp_matrix, sizeof(temp_matrix)) != 0;
if (changed) memcpy(raw_matrix, temp_matrix, sizeof(temp_matrix));
return changed;
}