summaryrefslogtreecommitdiff
path: root/keyboards/keychron/c2_pro
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/c2_pro
parente7b84e1cf6d864b1df41e7a81c576baa9d7ca30a (diff)
Migrate dip switch config to info.json - keychron (#23037)
Diffstat (limited to 'keyboards/keychron/c2_pro')
-rw-r--r--keyboards/keychron/c2_pro/c2_pro.c12
-rw-r--r--keyboards/keychron/c2_pro/config.h6
-rw-r--r--keyboards/keychron/c2_pro/info.json3
3 files changed, 3 insertions, 18 deletions
diff --git a/keyboards/keychron/c2_pro/c2_pro.c b/keyboards/keychron/c2_pro/c2_pro.c
index 2cd58ab4d7..593e404997 100644
--- a/keyboards/keychron/c2_pro/c2_pro.c
+++ b/keyboards/keychron/c2_pro/c2_pro.c
@@ -16,18 +16,6 @@
#include "quantum.h"
-// clang-format off
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111101111,
-};
-
-// clang-format on
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/c2_pro/config.h b/keyboards/keychron/c2_pro/config.h
index 6971ebd1aa..7422e29f6f 100644
--- a/keyboards/keychron/c2_pro/config.h
+++ b/keyboards/keychron/c2_pro/config.h
@@ -16,12 +16,6 @@
#pragma once
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { { 5, 4 } }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* EEPROM Driver Configuration */
#define WEAR_LEVELING_LOGICAL_SIZE 2048
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
diff --git a/keyboards/keychron/c2_pro/info.json b/keyboards/keychron/c2_pro/info.json
index dd97dd7adf..736a2e86a1 100644
--- a/keyboards/keychron/c2_pro/info.json
+++ b/keyboards/keychron/c2_pro/info.json
@@ -17,6 +17,9 @@
"mousekey": true,
"nkro": true
},
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ },
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "C14"],
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"],