diff options
author | Ryan <fauxpark@gmail.com> | 2023-02-26 09:45:12 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-26 09:45:12 +1100 |
commit | 7e0299117b389b1c7fcdfa2f20891ba2287ea771 (patch) | |
tree | 00bb5bb7b3b73a9de365d1839ba7d41240d439f1 /keyboards/atreyu | |
parent | 314f6c1ddba09851b33e4f3b4bd43bdbc55f9628 (diff) |
Move encoder config to data driven (#19923)
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'keyboards/atreyu')
-rw-r--r-- | keyboards/atreyu/rev1/config.h | 7 | ||||
-rw-r--r-- | keyboards/atreyu/rev1/info.json | 14 | ||||
-rw-r--r-- | keyboards/atreyu/rev2/config.h | 5 | ||||
-rw-r--r-- | keyboards/atreyu/rev2/info.json | 6 |
4 files changed, 20 insertions, 12 deletions
diff --git a/keyboards/atreyu/rev1/config.h b/keyboards/atreyu/rev1/config.h index 67a4d1d05d..99eb2c21e6 100644 --- a/keyboards/atreyu/rev1/config.h +++ b/keyboards/atreyu/rev1/config.h @@ -30,13 +30,6 @@ #define MATRIX_ROW_PINS { D7, E6, B4, B5, F6, F7, B1, B3, B6, B2 } #define MATRIX_COL_PINS { C6, D4, D0, D1, D2, D3 } -/* encoder support */ -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } -#define ENCODERS_PAD_A_RIGHT { F4 } -#define ENCODERS_PAD_B_RIGHT { F5 } -#define ENCODER_RESOLUTION 4 - /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreyu/rev1/info.json b/keyboards/atreyu/rev1/info.json index a9522acd5d..6d191d0635 100644 --- a/keyboards/atreyu/rev1/info.json +++ b/keyboards/atreyu/rev1/info.json @@ -8,6 +8,20 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + }, + "split": { + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + } + } + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/atreyu/rev2/config.h b/keyboards/atreyu/rev2/config.h index baaef0800c..de63cf3bd1 100644 --- a/keyboards/atreyu/rev2/config.h +++ b/keyboards/atreyu/rev2/config.h @@ -30,11 +30,6 @@ #define MATRIX_ROW_PINS { D7, E6, B4, B5, F6, F7, B1, B3, B6, B2 } #define MATRIX_COL_PINS { F4, F5, C6, D4, D2, D3 } -/* encoder support */ -#define ENCODERS_PAD_A { D5, D5 } -#define ENCODERS_PAD_B { B7, C7 } -#define ENCODER_RESOLUTION 4 - /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreyu/rev2/info.json b/keyboards/atreyu/rev2/info.json index 5c74a40c92..a890b8d271 100644 --- a/keyboards/atreyu/rev2/info.json +++ b/keyboards/atreyu/rev2/info.json @@ -8,6 +8,12 @@ "pid": "0x0001", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "D5", "pin_b": "B7"}, + {"pin_a": "D5", "pin_b": "C7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { |