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/tzarc/djinn | |
parent | 314f6c1ddba09851b33e4f3b4bd43bdbc55f9628 (diff) |
Move encoder config to data driven (#19923)
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'keyboards/tzarc/djinn')
-rw-r--r-- | keyboards/tzarc/djinn/config.h | 14 | ||||
-rw-r--r-- | keyboards/tzarc/djinn/info.json | 14 |
2 files changed, 13 insertions, 15 deletions
diff --git a/keyboards/tzarc/djinn/config.h b/keyboards/tzarc/djinn/config.h index bb2bd6f6e2..e8b2abc1f6 100644 --- a/keyboards/tzarc/djinn/config.h +++ b/keyboards/tzarc/djinn/config.h @@ -2,20 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -// Encoders -- right-side is reversed -#define ENCODERS_PAD_A \ - { C14 } -#define ENCODERS_PAD_B \ - { C15 } -#define ENCODERS_PAD_A_RIGHT \ - { C15 } -#define ENCODERS_PAD_B_RIGHT \ - { C14 } - -#ifndef ENCODER_RESOLUTION -# define ENCODER_RESOLUTION 2 -#endif // ENCODER_RESOLUTION - // Bootloader #define STM32_BOOTLOADER_DUAL_BANK TRUE #define STM32_BOOTLOADER_DUAL_BANK_GPIO B7 diff --git a/keyboards/tzarc/djinn/info.json b/keyboards/tzarc/djinn/info.json index cceaf637e5..19f5e52060 100644 --- a/keyboards/tzarc/djinn/info.json +++ b/keyboards/tzarc/djinn/info.json @@ -35,7 +35,19 @@ }, "split": { "enabled": true, - "main": "pin" + "main": "pin", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "C15", "pin_b": "C14", "resolution": 2} + ] + } + } + }, + "encoder": { + "rotary": [ + {"pin_a": "C14", "pin_b": "C15", "resolution": 2} + ] }, "layouts": { "LAYOUT_all": { |