summaryrefslogtreecommitdiff
path: root/keyboards/doio
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-02-26 09:45:12 +1100
committerGitHub <noreply@github.com>2023-02-26 09:45:12 +1100
commit7e0299117b389b1c7fcdfa2f20891ba2287ea771 (patch)
tree00bb5bb7b3b73a9de365d1839ba7d41240d439f1 /keyboards/doio
parent314f6c1ddba09851b33e4f3b4bd43bdbc55f9628 (diff)
Move encoder config to data driven (#19923)
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'keyboards/doio')
-rw-r--r--keyboards/doio/kb16/rev1/config.h4
-rw-r--r--keyboards/doio/kb16/rev1/info.json7
-rw-r--r--keyboards/doio/kb16/rev2/config.h4
-rw-r--r--keyboards/doio/kb16/rev2/info.json7
-rw-r--r--keyboards/doio/kb30/config.h6
-rw-r--r--keyboards/doio/kb30/info.json7
-rw-r--r--keyboards/doio/kb38/config.h5
-rw-r--r--keyboards/doio/kb38/info.json7
8 files changed, 28 insertions, 19 deletions
diff --git a/keyboards/doio/kb16/rev1/config.h b/keyboards/doio/kb16/rev1/config.h
index 5f30b97812..aa066fe393 100644
--- a/keyboards/doio/kb16/rev1/config.h
+++ b/keyboards/doio/kb16/rev1/config.h
@@ -31,10 +31,6 @@
/* Use the custom font */
#define OLED_FONT_H "./lib/glcdfont.c"
-/* Encoder pins */
-#define ENCODERS_PAD_A { F7, C7, D7 }
-#define ENCODERS_PAD_B { E6, C6, D6 }
-
#ifdef RGB_MATRIX_ENABLE
/* RGB Matrix config */
#define RGB_DI_PIN F6
diff --git a/keyboards/doio/kb16/rev1/info.json b/keyboards/doio/kb16/rev1/info.json
index d8bf6e8b73..d0acdedfb9 100644
--- a/keyboards/doio/kb16/rev1/info.json
+++ b/keyboards/doio/kb16/rev1/info.json
@@ -8,6 +8,13 @@
"pid": "0x1601",
"device_version": "0.0.1"
},
+ "encoder": {
+ "rotary": [
+ {"pin_a": "F7", "pin_b": "E6"},
+ {"pin_a": "C7", "pin_b": "C6"},
+ {"pin_a": "D7", "pin_b": "D6"}
+ ]
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/doio/kb16/rev2/config.h b/keyboards/doio/kb16/rev2/config.h
index 29367f26e8..e7e2791ac8 100644
--- a/keyboards/doio/kb16/rev2/config.h
+++ b/keyboards/doio/kb16/rev2/config.h
@@ -38,10 +38,6 @@
#define OLED_FONT_H "./lib/glcdfont.c"
#endif
-/* Encoder pins */
-#define ENCODERS_PAD_A { B5, A1, A3 }
-#define ENCODERS_PAD_B { B6, A2, A4 }
-
#ifdef RGB_MATRIX_ENABLE
/* RGB Matrix config */
#define RGB_DI_PIN A10
diff --git a/keyboards/doio/kb16/rev2/info.json b/keyboards/doio/kb16/rev2/info.json
index 28aa77b127..8b5eeb45c2 100644
--- a/keyboards/doio/kb16/rev2/info.json
+++ b/keyboards/doio/kb16/rev2/info.json
@@ -8,6 +8,13 @@
"pid": "0x1601",
"device_version": "0.0.2"
},
+ "encoder": {
+ "rotary": [
+ {"pin_a": "B5", "pin_b": "B6"},
+ {"pin_a": "A1", "pin_b": "A2"},
+ {"pin_a": "A3", "pin_b": "A4"}
+ ]
+ },
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/doio/kb30/config.h b/keyboards/doio/kb30/config.h
index 42e521c18d..866bd3e1d9 100644
--- a/keyboards/doio/kb30/config.h
+++ b/keyboards/doio/kb30/config.h
@@ -27,12 +27,6 @@
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-/* key encoders pins*/
-#define ENCODERS_PAD_A { B5 , A1 , A3 }
-#define ENCODERS_PAD_B { B6 , A2 , A4 }
-#define ENCODER_RESOLUTIONS \
- { 4, 4, 2 }
-
// #define QMK_KEYS_PER_SCAN 12
/* OLED */
diff --git a/keyboards/doio/kb30/info.json b/keyboards/doio/kb30/info.json
index 47ed0c3f42..9fe8e83185 100644
--- a/keyboards/doio/kb30/info.json
+++ b/keyboards/doio/kb30/info.json
@@ -8,6 +8,13 @@
"pid": "0x3001",
"device_version": "0.0.1"
},
+ "encoder": {
+ "rotary": [
+ {"pin_a": "B5", "pin_b": "B6"},
+ {"pin_a": "A1", "pin_b": "A2"},
+ {"pin_a": "A3", "pin_b": "A4", "resolution": 2}
+ ]
+ },
"processor": "STM32F103",
"bootloader": "stm32duino",
"layouts": {
diff --git a/keyboards/doio/kb38/config.h b/keyboards/doio/kb38/config.h
index 416219d5c7..740f1baea7 100644
--- a/keyboards/doio/kb38/config.h
+++ b/keyboards/doio/kb38/config.h
@@ -16,11 +16,6 @@
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
-#define ENCODERS_PAD_A { C7, F7, D6 }
-#define ENCODERS_PAD_B { C6, E6, D7 }
-#define ENCODER_RESOLUTIONS { 4, 4, 2 }
-
-
/*
* Feature disable options
* These options are also useful to firmware size reduction.
diff --git a/keyboards/doio/kb38/info.json b/keyboards/doio/kb38/info.json
index 9d75ada43e..227511295c 100644
--- a/keyboards/doio/kb38/info.json
+++ b/keyboards/doio/kb38/info.json
@@ -25,6 +25,13 @@
"pid": "0x0000",
"vid": "0xFEED"
},
+ "encoder": {
+ "rotary": [
+ {"pin_a": "C7", "pin_b": "C6"},
+ {"pin_a": "F7", "pin_b": "E6"},
+ {"pin_a": "D6", "pin_b": "D7", "resolution": 2}
+ ]
+ },
"rgb_matrix": {
"driver": "WS2812",
"layout": [