summaryrefslogtreecommitdiff
path: root/keyboards/keychron/q11
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2024-02-09 06:56:13 +0000
committerGitHub <noreply@github.com>2024-02-09 06:56:13 +0000
commit137938b67afbf35fd34f2e5cbe3c5c6367a1d0cc (patch)
tree9bde863a119f5e8c84840b34c839011d9403cfb6 /keyboards/keychron/q11
parente7b84e1cf6d864b1df41e7a81c576baa9d7ca30a (diff)
Migrate dip switch config to info.json - keychron (#23037)
Diffstat (limited to 'keyboards/keychron/q11')
-rwxr-xr-xkeyboards/keychron/q11/config.h9
-rwxr-xr-xkeyboards/keychron/q11/info.json6
-rwxr-xr-xkeyboards/keychron/q11/q11.c19
3 files changed, 6 insertions, 28 deletions
diff --git a/keyboards/keychron/q11/config.h b/keyboards/keychron/q11/config.h
index 949e5cf1da..184785ed98 100755
--- a/keyboards/keychron/q11/config.h
+++ b/keyboards/keychron/q11/config.h
@@ -16,15 +16,6 @@
#pragma once
-// Connects each switch in the dip switch to the GPIO pin of the MCU
-#define DIP_SWITCH_PINS \
- { A8 }
-
-/* handedness */
-#define SPLIT_HAND_MATRIX_GRID A2, A15
-
-#define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `q11.c`
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
diff --git a/keyboards/keychron/q11/info.json b/keyboards/keychron/q11/info.json
index f240c70801..8b962e4a76 100755
--- a/keyboards/keychron/q11/info.json
+++ b/keyboards/keychron/q11/info.json
@@ -11,6 +11,9 @@
"bootmagic": {
"matrix": [0, 1]
},
+ "dip_switch": {
+ "pins": ["A8"]
+ },
"features": {
"bootmagic": true,
"command": false,
@@ -36,6 +39,9 @@
]
}
},
+ "handedness": {
+ "matrix_grid": ["A2", "A15"]
+ },
"matrix_pins": {
"right": {
"cols": ["A8", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0"],
diff --git a/keyboards/keychron/q11/q11.c b/keyboards/keychron/q11/q11.c
index bf7bab4b53..f643113ea3 100755
--- a/keyboards/keychron/q11/q11.c
+++ b/keyboards/keychron/q11/q11.c
@@ -16,25 +16,6 @@
#include "quantum.h"
-// Mask out handedness diode to prevent it
-// from keeping the keyboard awake
-// - just mirroring `KC_NO` in the `LAYOUT`
-// macro to keep it simple
-const matrix_row_t matrix_mask[] = {
- 0b011111111,
- 0b011111111,
- 0b011011111,
- 0b001111111,
- 0b011111111,
- 0b001011111,
- 0b111111111,
- 0b101111111,
- 0b111111111,
- 0b110111111,
- 0b010111111,
- 0b111011110,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (!dip_switch_update_user(index, active)) {