summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keyboards/keychron/q6_pro/ansi_encoder/keymaps/default/rules.mk1
-rw-r--r--keyboards/keychron/q6_pro/ansi_encoder/keymaps/via/rules.mk1
-rwxr-xr-xkeyboards/keychron/q6_pro/info.json1
-rw-r--r--keyboards/keychron/q6_pro/matrix.c16
-rwxr-xr-xkeyboards/keychron/q6_pro/q6_pro.c4
5 files changed, 10 insertions, 13 deletions
diff --git a/keyboards/keychron/q6_pro/ansi_encoder/keymaps/default/rules.mk b/keyboards/keychron/q6_pro/ansi_encoder/keymaps/default/rules.mk
new file mode 100644
index 0000000000..98eb98e882
--- /dev/null
+++ b/keyboards/keychron/q6_pro/ansi_encoder/keymaps/default/rules.mk
@@ -0,0 +1 @@
+ENCODER_MAP = yes
diff --git a/keyboards/keychron/q6_pro/ansi_encoder/keymaps/via/rules.mk b/keyboards/keychron/q6_pro/ansi_encoder/keymaps/via/rules.mk
index 1e5b99807c..b8c56c84c0 100644
--- a/keyboards/keychron/q6_pro/ansi_encoder/keymaps/via/rules.mk
+++ b/keyboards/keychron/q6_pro/ansi_encoder/keymaps/via/rules.mk
@@ -1 +1,2 @@
VIA_ENABLE = yes
+ENCODER_MAP = yes
diff --git a/keyboards/keychron/q6_pro/info.json b/keyboards/keychron/q6_pro/info.json
index 186a4e2edd..02eef80f89 100755
--- a/keyboards/keychron/q6_pro/info.json
+++ b/keyboards/keychron/q6_pro/info.json
@@ -16,7 +16,6 @@
"dip_switch": true,
"bluetooth": false,
"encoder": true,
- "encoder_map": true,
"raw": true
},
"rgb_matrix": {
diff --git a/keyboards/keychron/q6_pro/matrix.c b/keyboards/keychron/q6_pro/matrix.c
index 1c0dbdc537..deecad8a49 100644
--- a/keyboards/keychron/q6_pro/matrix.c
+++ b/keyboards/keychron/q6_pro/matrix.c
@@ -20,6 +20,8 @@
#define HC595_SHCP A1
#define HC595_DS A7
+#define DIRECT_COL_NUM 0
+
pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
@@ -47,10 +49,10 @@ static void HC595_output(uint32_t data, bool bit) {
} else {
writePinLow(HC595_DS);
}
+ HC595_delay(n);
writePinHigh(HC595_SHCP);
HC595_delay(n);
writePinLow(HC595_SHCP);
- HC595_delay(n);
if (bit) {
break;
} else {
@@ -60,17 +62,15 @@ static void HC595_output(uint32_t data, bool bit) {
writePinHigh(HC595_STCP);
HC595_delay(n);
writePinLow(HC595_STCP);
- HC595_delay(n);
}
static void select_col(uint8_t col) {
- if (col == 0) {
+ if (col == DIRECT_COL_NUM) {
HC595_output(0x00, 1);
}
}
-static void unselect_col(uint8_t col) {
- (void)col;
+static void unselect_col(void) {
HC595_output(0X01, 1);
}
@@ -87,10 +87,6 @@ static void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t curre
// Select col
select_col(current_col); // select col
- // if (!select_col(current_col)) { // select col
- // return; // skip NO_PIN col
- // }
-
matrix_output_select_delay();
// For each row...
@@ -107,7 +103,7 @@ static void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t curre
}
// Unselect col
- unselect_col(current_col);
+ unselect_col();
matrix_output_unselect_delay(current_col, key_pressed); // wait for all Row signals to go HIGH
}
diff --git a/keyboards/keychron/q6_pro/q6_pro.c b/keyboards/keychron/q6_pro/q6_pro.c
index e50f245b5d..cff287f7eb 100755
--- a/keyboards/keychron/q6_pro/q6_pro.c
+++ b/keyboards/keychron/q6_pro/q6_pro.c
@@ -119,7 +119,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
break;
case BAT_LVL:
if (get_transport() == TRANSPORT_BLUETOOTH && !usb_power_connected()) {
- bat_level_animation_start(battery_get_percentage());
+ bat_level_animiation_start(battery_get_percentage());
}
break;
#endif
@@ -134,7 +134,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
#if defined(ENCODER_ENABLE) && defined(PAL_USE_CALLBACKS)
static void encoder_pad_cb(void *param) {
- encoder_interrupt_read((uint32_t)param & 0XFF);
+ encoder_inerrupt_read((uint32_t)param & 0XFF);
}
#endif