From f6a0410e2e06cdcc19b619719abfc3e18a5ad15f Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 22 Feb 2023 22:06:40 +1100 Subject: [PATCH 01/31] Remove default `ENCODER_RESOLUTION` --- keyboards/0xcb/1337/config.h | 2 +- keyboards/0xcb/static/config.h | 2 +- keyboards/10bleoledhub/config.h | 2 -- keyboards/25keys/cassette42/config.h | 1 - keyboards/7c8/framework/config.h | 1 - keyboards/abacus/config.h | 1 - keyboards/adpenrose/akemipad/config.h | 4 ---- keyboards/adpenrose/kintsugi/config.h | 4 ---- keyboards/adpenrose/obi/config.h | 4 ---- keyboards/aplyard/aplx6/rev2/config.h | 1 - keyboards/atlantis/ak81_ve/config.h | 1 - keyboards/atreyu/rev1/config.h | 1 - keyboards/atreyu/rev2/config.h | 1 - keyboards/basketweave/config.h | 2 +- keyboards/checkerboards/phoenix45_ortho/config.h | 1 - keyboards/checkerboards/quark/config.h | 1 - keyboards/checkerboards/quark_plus/config.h | 1 - keyboards/cherrybstudio/cb65/config.h | 1 - keyboards/chromatonemini/info.json | 2 +- keyboards/ckeys/thedora/config.h | 1 - keyboards/clueboard/2x1800/2019/config.h | 1 - keyboards/clueboard/2x1800/2021/config.h | 1 - keyboards/dmqdesign/spin/config.h | 1 - keyboards/draculad/config.h | 1 - keyboards/ealdin/quadrant/config.h | 1 - keyboards/ein_60/config.h | 1 - keyboards/giabalanai/config.h | 2 -- keyboards/handwired/d48/config.h | 1 - keyboards/handwired/dactylmacropad/config.h | 2 +- keyboards/handwired/daskeyboard/daskeyboard4/info.json | 3 +-- keyboards/handwired/dc/mc/001/config.h | 1 - keyboards/handwired/prkl30/feather/config.h | 1 - keyboards/handwired/prkl30/promicro/config.h | 1 - keyboards/handwired/snatchpad/config.h | 1 - keyboards/jkeys_design/gentleman65/config.h | 1 - keyboards/jkeys_design/gentleman65_se_s/config.h | 1 - keyboards/jones/v03/config.h | 1 - keyboards/jones/v03_1/config.h | 1 - keyboards/jones/v1/config.h | 1 - keyboards/keycapsss/plaid_pad/config.h | 2 -- keyboards/keychron/q0/rev_0131/config.h | 1 - keyboards/keychron/q1/ansi_encoder/config.h | 3 --- keyboards/keychron/q10/ansi_encoder/config.h | 1 - keyboards/keychron/q10/iso_encoder/config.h | 1 - keyboards/keychron/q2/ansi_encoder/config.h | 1 - keyboards/keychron/q2/iso_encoder/config.h | 1 - keyboards/keychron/q2/jis_encoder/config.h | 1 - keyboards/keychron/q3/ansi_encoder/config.h | 1 - keyboards/keychron/q3/iso_encoder/config.h | 1 - keyboards/keychron/q3/jis_encoder/config.h | 1 - keyboards/keychron/q5/ansi_encoder/config.h | 1 - keyboards/keychron/q5/iso_encoder/config.h | 1 - keyboards/keychron/q6/ansi_encoder/config.h | 1 - keyboards/keychron/q6/iso_encoder/config.h | 1 - keyboards/keychron/q65/ansi_encoder/config.h | 1 - keyboards/keychron/q8/ansi_encoder/config.h | 1 - keyboards/keychron/q8/iso_encoder/config.h | 1 - keyboards/keychron/q9/ansi_encoder/config.h | 1 - keyboards/keychron/q9/iso_encoder/config.h | 1 - keyboards/keychron/v1/ansi_encoder/config.h | 1 - keyboards/keychron/v1/iso_encoder/config.h | 1 - keyboards/keychron/v1/jis_encoder/config.h | 1 - keyboards/keychron/v10/ansi_encoder/config.h | 1 - keyboards/keychron/v10/iso_encoder/config.h | 1 - keyboards/keychron/v2/ansi_encoder/config.h | 1 - keyboards/keychron/v2/iso_encoder/config.h | 1 - keyboards/keychron/v2/jis_encoder/config.h | 1 - keyboards/keychron/v3/ansi_encoder/config.h | 1 - keyboards/keychron/v3/iso_encoder/config.h | 1 - keyboards/keychron/v3/jis_encoder/config.h | 1 - keyboards/keychron/v5/ansi_encoder/config.h | 1 - keyboards/keychron/v5/iso_encoder/config.h | 1 - keyboards/keychron/v6/ansi_encoder/config.h | 1 - keyboards/keychron/v6/iso_encoder/config.h | 1 - keyboards/keychron/v8/ansi_encoder/config.h | 1 - keyboards/keychron/v8/iso_encoder/config.h | 1 - keyboards/keyprez/bison/config.h | 1 - keyboards/keyprez/corgi/config.h | 1 - keyboards/keyprez/rhino/config.h | 1 - keyboards/keyprez/unicorn/config.h | 2 -- keyboards/keystonecaps/gameroyadvance/config.h | 1 - keyboards/kiwikey/borderland/config.h | 2 +- keyboards/latincompass/latinpad/config.h | 2 -- keyboards/latincompass/latinpadble/config.h | 2 -- keyboards/leafcutterlabs/bigknob/config.h | 1 - keyboards/lw67/config.h | 1 - keyboards/macro1/config.h | 1 - keyboards/maxr1998/pulse4k/config.h | 1 - keyboards/mechanickeys/undead60m/config.h | 1 - keyboards/mechlovin/adelais/rgb_led/rev2/config.h | 1 - keyboards/mechlovin/adelais/rgb_led/rev3/config.h | 2 +- keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h | 1 - keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h | 1 - keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h | 1 - keyboards/mechlovin/foundation/config.h | 1 - keyboards/mechlovin/hex6c/config.h | 1 - keyboards/mechlovin/zed65/no_backlight/retro66/config.h | 2 -- keyboards/mechwild/bde/rev2/config.h | 3 --- keyboards/mechwild/clunker/config.h | 1 - keyboards/mechwild/mercutio/config.h | 2 -- keyboards/mechwild/mokulua/mirrored/config.h | 2 -- keyboards/mechwild/mokulua/standard/config.h | 2 -- keyboards/mechwild/murphpad/config.h | 2 -- keyboards/mechwild/obe/config.h | 2 -- keyboards/mechwild/puckbuddy/config.h | 2 -- keyboards/mechwild/waka60/config.h | 2 -- keyboards/merge/iso_macro/config.h | 1 - keyboards/merge/uc1/config.h | 1 - keyboards/millipad/config.h | 1 - keyboards/mlego/m48/rev1/config.h | 1 - keyboards/mlego/m60_split/rev1/config.h | 2 -- keyboards/mlego/m60_split/rev2/config.h | 3 --- keyboards/mlego/m65/rev1/config.h | 2 -- keyboards/mlego/m65/rev2/config.h | 2 -- keyboards/mlego/m65/rev3/config.h | 1 - keyboards/mlego/m65/rev4/config.h | 1 - keyboards/neito/config.h | 1 - keyboards/nixkeyboards/day_off/config.h | 1 - keyboards/owlab/voice65/hotswap/config.h | 2 +- keyboards/owlab/voice65/soldered/config.h | 2 +- keyboards/pauperboards/brick/info.json | 2 +- keyboards/pica40/rev2/rev2.h | 3 --- keyboards/psuieee/pluto12/config.h | 1 - keyboards/qpockets/eggman/config.h | 3 --- keyboards/qpockets/wanten/config.h | 3 --- keyboards/rainkeebs/rainkeeb/config.h | 1 - keyboards/rart/rart75hs/config.h | 1 - keyboards/redox_media/config.h | 1 - keyboards/reedskeebs/alish40/info.json | 3 +-- keyboards/rgbkb/pan/config.h | 2 -- keyboards/ristretto/config.h | 1 - keyboards/sawnsprojects/krush/krush65/solder/config.h | 1 - keyboards/sofle/keyhive/config.h | 1 - keyboards/spacey/config.h | 1 - keyboards/sthlmkb/lagom/info.json | 4 ++-- keyboards/sthlmkb/litl/info.json | 2 +- keyboards/synapse/config.h | 2 -- keyboards/synthlabs/solo/config.h | 1 - keyboards/takashicompany/compacx/config.h | 1 - keyboards/takashicompany/dogtag/config.h | 1 - keyboards/takashicompany/spreadwriter/config.h | 2 -- keyboards/unison/v04/config.h | 1 - keyboards/winry/winry315/config.h | 1 - 143 files changed, 15 insertions(+), 187 deletions(-) diff --git a/keyboards/0xcb/1337/config.h b/keyboards/0xcb/1337/config.h index 5b576cc0c5d5..801e2d49507a 100644 --- a/keyboards/0xcb/1337/config.h +++ b/keyboards/0xcb/1337/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . // clang-format off #define TAP_CODE_DELAY 10 -#define ENCODER_RESOLUTION 4 + #define ENCODERS_PAD_A { F6 } #define ENCODERS_PAD_B { F5 } diff --git a/keyboards/0xcb/static/config.h b/keyboards/0xcb/static/config.h index 0f517163e5e7..3a0fe0027f76 100644 --- a/keyboards/0xcb/static/config.h +++ b/keyboards/0xcb/static/config.h @@ -35,7 +35,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define TAP_CODE_DELAY 10 -#define ENCODER_RESOLUTION 4 + #define ENCODERS_PAD_A { D0 } #define ENCODERS_PAD_B { D1 } // clang-format on diff --git a/keyboards/10bleoledhub/config.h b/keyboards/10bleoledhub/config.h index 0fcd15894f73..6d356efaf69c 100644 --- a/keyboards/10bleoledhub/config.h +++ b/keyboards/10bleoledhub/config.h @@ -43,5 +43,3 @@ along with this program. If not, see .*/ #define ENCODERS_PAD_A { C7 } #define ENCODERS_PAD_B { F7 } - -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/25keys/cassette42/config.h b/keyboards/25keys/cassette42/config.h index c57f66da5d55..003daa91cc38 100644 --- a/keyboards/25keys/cassette42/config.h +++ b/keyboards/25keys/cassette42/config.h @@ -19,7 +19,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { B6, B3 } #define ENCODERS_PAD_B { B2, B1 } -#define ENCODER_RESOLUTION 4 #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN diff --git a/keyboards/7c8/framework/config.h b/keyboards/7c8/framework/config.h index 3cc7d44f1b37..7501c116e7be 100644 --- a/keyboards/7c8/framework/config.h +++ b/keyboards/7c8/framework/config.h @@ -21,7 +21,6 @@ #define ENCODERS_PAD_A { D0 } #define ENCODERS_PAD_B { D1 } -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 16 #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/abacus/config.h b/keyboards/abacus/config.h index 0fff00525720..85595a06795c 100644 --- a/keyboards/abacus/config.h +++ b/keyboards/abacus/config.h @@ -35,7 +35,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { F1 } #define ENCODERS_PAD_B { F0 } -#define ENCODER_RESOLUTION 4 /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/adpenrose/akemipad/config.h b/keyboards/adpenrose/akemipad/config.h index 41156ecf3d33..f5f58ebeccd2 100644 --- a/keyboards/adpenrose/akemipad/config.h +++ b/keyboards/adpenrose/akemipad/config.h @@ -20,10 +20,6 @@ /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/*Rotary encoder - set the resolution fitting your encoder. -Most will need a value of 4. If 1 encoder click results in 2 keycodes sent -increase the value. If you need 2 clicks for 1 keycode, decrease*/ -#define ENCODER_RESOLUTION 4 #define ENCODERS_PAD_A { B1 } #define ENCODERS_PAD_B { B3 } #define TAP_CODE_DELAY 10 diff --git a/keyboards/adpenrose/kintsugi/config.h b/keyboards/adpenrose/kintsugi/config.h index c4007613e980..0c1ab9100e34 100644 --- a/keyboards/adpenrose/kintsugi/config.h +++ b/keyboards/adpenrose/kintsugi/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/*Rotary encoder - set the resolution fitting your encoder. -Most will need a value of 4. If 1 encoder click results in 2 keycodes sent -increase the value. If you need 2 clicks for 1 keycode, decrease*/ -#define ENCODER_RESOLUTION 4 #define ENCODERS_PAD_A { B7 } #define ENCODERS_PAD_B { D5 } #define TAP_CODE_DELAY 10 diff --git a/keyboards/adpenrose/obi/config.h b/keyboards/adpenrose/obi/config.h index c577a4a727d8..10936dd9dcce 100644 --- a/keyboards/adpenrose/obi/config.h +++ b/keyboards/adpenrose/obi/config.h @@ -20,10 +20,6 @@ /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/*Rotary encoder - set the resolution fitting your encoder. -Most will need a value of 4. If 1 encoder click results in 2 keycodes sent -increase the value. If you need 2 clicks for 1 keycode, decrease*/ -#define ENCODER_RESOLUTION 4 #define ENCODERS_PAD_A { F1 } #define ENCODERS_PAD_B { F0 } #define TAP_CODE_DELAY 10 diff --git a/keyboards/aplyard/aplx6/rev2/config.h b/keyboards/aplyard/aplx6/rev2/config.h index 1e109c700169..fdfa5a6809c2 100644 --- a/keyboards/aplyard/aplx6/rev2/config.h +++ b/keyboards/aplyard/aplx6/rev2/config.h @@ -30,6 +30,5 @@ along with this program. If not, see . /* Encoder */ #define ENCODERS_PAD_A { F5 } #define ENCODERS_PAD_B { F4 } -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 50 diff --git a/keyboards/atlantis/ak81_ve/config.h b/keyboards/atlantis/ak81_ve/config.h index 4a7898350df1..0f3442b136d0 100644 --- a/keyboards/atlantis/ak81_ve/config.h +++ b/keyboards/atlantis/ak81_ve/config.h @@ -24,7 +24,6 @@ /* Encoder pins */ #define ENCODERS_PAD_A { E6 } #define ENCODERS_PAD_B { B0 } -#define ENCODER_RESOLUTION 4 #define ENCODERS 1 #define ENCODERS_CCW_KEY { { 4, 5 } } // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 3, 5 } } // Note: array is { col, row ) diff --git a/keyboards/atreyu/rev1/config.h b/keyboards/atreyu/rev1/config.h index 67a4d1d05da6..38c73ec7e08f 100644 --- a/keyboards/atreyu/rev1/config.h +++ b/keyboards/atreyu/rev1/config.h @@ -35,7 +35,6 @@ #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/rev2/config.h b/keyboards/atreyu/rev2/config.h index baaef0800c97..75b4691cf217 100644 --- a/keyboards/atreyu/rev2/config.h +++ b/keyboards/atreyu/rev2/config.h @@ -33,7 +33,6 @@ /* 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/basketweave/config.h b/keyboards/basketweave/config.h index dca609a1703d..b25383729e69 100644 --- a/keyboards/basketweave/config.h +++ b/keyboards/basketweave/config.h @@ -32,5 +32,5 @@ #define ENCODERS_PAD_A { D7 } #define ENCODERS_PAD_B { C0 } -#define ENCODER_RESOLUTION 4 + #define TAP_CODE_DELAY 10 diff --git a/keyboards/checkerboards/phoenix45_ortho/config.h b/keyboards/checkerboards/phoenix45_ortho/config.h index 3f1b16129a99..668a09d9368d 100644 --- a/keyboards/checkerboards/phoenix45_ortho/config.h +++ b/keyboards/checkerboards/phoenix45_ortho/config.h @@ -33,4 +33,3 @@ /* encoder pads */ #define ENCODERS_PAD_A { B1 } #define ENCODERS_PAD_B { B2 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/checkerboards/quark/config.h b/keyboards/checkerboards/quark/config.h index c064c8569a91..d8c8f7be99f7 100644 --- a/keyboards/checkerboards/quark/config.h +++ b/keyboards/checkerboards/quark/config.h @@ -50,4 +50,3 @@ // rotary encoder parameters #define ENCODERS_PAD_A { B0 } #define ENCODERS_PAD_B { D1 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/checkerboards/quark_plus/config.h b/keyboards/checkerboards/quark_plus/config.h index 004fc8a17764..fc1104eb5fda 100644 --- a/keyboards/checkerboards/quark_plus/config.h +++ b/keyboards/checkerboards/quark_plus/config.h @@ -54,4 +54,3 @@ #define ENCODERS_PAD_A { C7, B7, B3, B2} #define ENCODERS_PAD_B { B7, C7, B2, B3} -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/cherrybstudio/cb65/config.h b/keyboards/cherrybstudio/cb65/config.h index 6bf9dba1e5aa..85aec06c440c 100644 --- a/keyboards/cherrybstudio/cb65/config.h +++ b/keyboards/cherrybstudio/cb65/config.h @@ -31,7 +31,6 @@ along with this program. If not, see . /* Encoder configuration */ //#define ENCODERS_PAD_A { F5 } //#define ENCODERS_PAD_B { F6 } -//#define ENCODER_RESOLUTION 4 /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/chromatonemini/info.json b/keyboards/chromatonemini/info.json index 506347a4d582..c4307fe98878 100644 --- a/keyboards/chromatonemini/info.json +++ b/keyboards/chromatonemini/info.json @@ -77,7 +77,7 @@ }, "encoder": { "rotary": [ - { "pin_a": "B5", "pin_b": "B4", "resolution": 4 } + { "pin_a": "B5", "pin_b": "B4" } ] } } diff --git a/keyboards/ckeys/thedora/config.h b/keyboards/ckeys/thedora/config.h index 787b4dcc19b1..63f4397fccc9 100755 --- a/keyboards/ckeys/thedora/config.h +++ b/keyboards/ckeys/thedora/config.h @@ -19,7 +19,6 @@ #define ENCODERS_PAD_A { B13 } #define ENCODERS_PAD_B { B15 } -#define ENCODER_RESOLUTION 4 #define MATRIX_ROW_PINS { A2, A1, A0, B8 } #define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0 } diff --git a/keyboards/clueboard/2x1800/2019/config.h b/keyboards/clueboard/2x1800/2019/config.h index b73b5bb9ff9f..73ae6ffde2d9 100644 --- a/keyboards/clueboard/2x1800/2019/config.h +++ b/keyboards/clueboard/2x1800/2019/config.h @@ -23,7 +23,6 @@ along with this program. If not, see . */ #define ENCODERS_PAD_A { A5, A4, A2, A1 } #define ENCODERS_PAD_B { A6, A7, A3, A0 } -#define ENCODER_RESOLUTION 4 /* audio support */ #define AUDIO_PIN_ALT B7 diff --git a/keyboards/clueboard/2x1800/2021/config.h b/keyboards/clueboard/2x1800/2021/config.h index 8e5146298374..ef9f9e802761 100644 --- a/keyboards/clueboard/2x1800/2021/config.h +++ b/keyboards/clueboard/2x1800/2021/config.h @@ -28,7 +28,6 @@ along with this program. If not, see . */ #define ENCODERS_PAD_A { D0, C5 } #define ENCODERS_PAD_B { D1, C6 } -#define ENCODER_RESOLUTION 4 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/dmqdesign/spin/config.h b/keyboards/dmqdesign/spin/config.h index 47255ed3aeaa..a16e1454f63a 100644 --- a/keyboards/dmqdesign/spin/config.h +++ b/keyboards/dmqdesign/spin/config.h @@ -29,7 +29,6 @@ along with this program. If not, see . //rotary encoder setup #define ENCODERS_PAD_A { B6, B4, D6 } #define ENCODERS_PAD_B { B5, D7, D4 } -#define ENCODER_RESOLUTION 4 //Data pin for the 3 RGB LEDs #define RGB_DI_PIN D3 diff --git a/keyboards/draculad/config.h b/keyboards/draculad/config.h index 8ea9dd48d5d9..9d6c41104235 100644 --- a/keyboards/draculad/config.h +++ b/keyboards/draculad/config.h @@ -45,7 +45,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A {B2 , B4} #define ENCODERS_PAD_B {B6 , B5} -#define ENCODER_RESOLUTIONS { 4, 4 } #define ENCODER_RESOLUTIONS_RIGHT { 4, 1 } #define EE_HANDS diff --git a/keyboards/ealdin/quadrant/config.h b/keyboards/ealdin/quadrant/config.h index e4f37ae1c9a5..3a9dfdecf11e 100644 --- a/keyboards/ealdin/quadrant/config.h +++ b/keyboards/ealdin/quadrant/config.h @@ -26,7 +26,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { D5 } #define ENCODERS_PAD_B { F1 } -#define ENCODER_RESOLUTION 4 #define RGB_DI_PIN C7 #ifdef RGB_DI_PIN diff --git a/keyboards/ein_60/config.h b/keyboards/ein_60/config.h index 3297437ae8cc..946d01cd53b1 100644 --- a/keyboards/ein_60/config.h +++ b/keyboards/ein_60/config.h @@ -26,7 +26,6 @@ along with this program. If not, see . #ifdef ENCODER_ENABLE # define ENCODERS_PAD_A { B0, C5 } # define ENCODERS_PAD_B { E3, C4 } -# define ENCODER_RESOLUTIONS { 4, 4 } #endif #ifdef OLED_ENABLE diff --git a/keyboards/giabalanai/config.h b/keyboards/giabalanai/config.h index a24f802ff045..ed349c5af3c6 100644 --- a/keyboards/giabalanai/config.h +++ b/keyboards/giabalanai/config.h @@ -226,10 +226,8 @@ along with this program. If not, see . #ifdef ENCODER_ENABLE # define ENCODERS_PAD_A { } # define ENCODERS_PAD_B { } -# define ENCODER_RESOLUTIONS { } # define ENCODERS_PAD_A_RIGHT { B4 } # define ENCODERS_PAD_B_RIGHT { B6 } -# define ENCODER_RESOLUTIONS_RIGHT { 4 } # define TAP_CODE_DELAY 10 #endif // ENCODER_ENABLE diff --git a/keyboards/handwired/d48/config.h b/keyboards/handwired/d48/config.h index 21f78e0645ca..dfaeacdcf767 100644 --- a/keyboards/handwired/d48/config.h +++ b/keyboards/handwired/d48/config.h @@ -43,7 +43,6 @@ /* Encoders */ #define ENCODERS_PAD_A { B3, A0 } #define ENCODERS_PAD_B { A6, A1 } -/* #define ENCODER_RESOLUTION 4 */ /* OLED */ #define OLED_FONT_H "glcdfont_d48.c" diff --git a/keyboards/handwired/dactylmacropad/config.h b/keyboards/handwired/dactylmacropad/config.h index e69ceac33173..f253d568e00a 100644 --- a/keyboards/handwired/dactylmacropad/config.h +++ b/keyboards/handwired/dactylmacropad/config.h @@ -21,5 +21,5 @@ #define ENCODERS_PAD_A { D1 } #define ENCODERS_PAD_B { D0 } -#define ENCODER_RESOLUTION 4 + #define TAP_CODE_DELAY 100 diff --git a/keyboards/handwired/daskeyboard/daskeyboard4/info.json b/keyboards/handwired/daskeyboard/daskeyboard4/info.json index 067450ae0bb0..900a66bb8b95 100644 --- a/keyboards/handwired/daskeyboard/daskeyboard4/info.json +++ b/keyboards/handwired/daskeyboard/daskeyboard4/info.json @@ -39,8 +39,7 @@ "rotary": [ { "pin_a": "B13", - "pin_b": "B12", - "resolution": 4 + "pin_b": "B12" } ] }, diff --git a/keyboards/handwired/dc/mc/001/config.h b/keyboards/handwired/dc/mc/001/config.h index 7be4ba0aa9bc..de8c26cb13b0 100644 --- a/keyboards/handwired/dc/mc/001/config.h +++ b/keyboards/handwired/dc/mc/001/config.h @@ -25,7 +25,6 @@ along with this program. If not, see . { B6 } #define ENCODERS_PAD_B \ { B5 } -#define ENCODER_RESOLUTION 4 /* * Feature disable options diff --git a/keyboards/handwired/prkl30/feather/config.h b/keyboards/handwired/prkl30/feather/config.h index 5e94752e1b59..afa692b47605 100644 --- a/keyboards/handwired/prkl30/feather/config.h +++ b/keyboards/handwired/prkl30/feather/config.h @@ -22,7 +22,6 @@ #define DIODE_DIRECTION COL2ROW #define ENCODERS_PAD_A { F7 } #define ENCODERS_PAD_B { F6 } -#define ENCODER_RESOLUTION 4 /* RGB Light Configuration */ diff --git a/keyboards/handwired/prkl30/promicro/config.h b/keyboards/handwired/prkl30/promicro/config.h index 6edad3bc5cd0..59b6cc84d23c 100644 --- a/keyboards/handwired/prkl30/promicro/config.h +++ b/keyboards/handwired/prkl30/promicro/config.h @@ -22,7 +22,6 @@ #define DIODE_DIRECTION COL2ROW #define ENCODERS_PAD_A { D3 } #define ENCODERS_PAD_B { D2 } -#define ENCODER_RESOLUTION 4 /* RGB Light Configuration */ diff --git a/keyboards/handwired/snatchpad/config.h b/keyboards/handwired/snatchpad/config.h index 97de836d049b..592f643435b4 100644 --- a/keyboards/handwired/snatchpad/config.h +++ b/keyboards/handwired/snatchpad/config.h @@ -21,7 +21,6 @@ #define DIODE_DIRECTION COL2ROW /* Rotary encoder options */ -#define ENCODER_RESOLUTIONS { 4, 4 } #define ENCODERS_PAD_A { D3, D0 } #define ENCODERS_PAD_B { D2, D1 } diff --git a/keyboards/jkeys_design/gentleman65/config.h b/keyboards/jkeys_design/gentleman65/config.h index 91259c5f2cf3..0b6f74b29cc8 100644 --- a/keyboards/jkeys_design/gentleman65/config.h +++ b/keyboards/jkeys_design/gentleman65/config.h @@ -41,6 +41,5 @@ along with this program. If not, see . #define ENCODERS_PAD_A { F6 } #define ENCODERS_PAD_B { F5 } -#define ENCODER_RESOLUTION 4 #define RGB_MATRIX_LED_COUNT 14 diff --git a/keyboards/jkeys_design/gentleman65_se_s/config.h b/keyboards/jkeys_design/gentleman65_se_s/config.h index 662d0b78c291..b3b5daf5ad09 100644 --- a/keyboards/jkeys_design/gentleman65_se_s/config.h +++ b/keyboards/jkeys_design/gentleman65_se_s/config.h @@ -41,6 +41,5 @@ along with this program. If not, see . #define ENCODERS_PAD_A { B0 } #define ENCODERS_PAD_B { B1 } -#define ENCODER_RESOLUTION 4 #define RGB_MATRIX_LED_COUNT 14 diff --git a/keyboards/jones/v03/config.h b/keyboards/jones/v03/config.h index f04b9cc78e36..5031eb942c95 100644 --- a/keyboards/jones/v03/config.h +++ b/keyboards/jones/v03/config.h @@ -44,7 +44,6 @@ along with this program. If not, see . /* Rotary Encoder */ #define ENCODERS_PAD_A { F6, B3 } #define ENCODERS_PAD_B { F7, B2 } -#define ENCODER_RESOLUTION 4 //the default & suggested is 4 /* Audio */ #ifdef AUDIO_ENABLE diff --git a/keyboards/jones/v03_1/config.h b/keyboards/jones/v03_1/config.h index b0d12c81558a..1a285f2b6a6f 100644 --- a/keyboards/jones/v03_1/config.h +++ b/keyboards/jones/v03_1/config.h @@ -44,7 +44,6 @@ along with this program. If not, see . /* Rotary Encoder */ #define ENCODERS_PAD_A { F6, B3 } #define ENCODERS_PAD_B { F7, B2 } -#define ENCODER_RESOLUTION 4 //the default & suggested is 4 /* Audio */ #ifdef AUDIO_ENABLE diff --git a/keyboards/jones/v1/config.h b/keyboards/jones/v1/config.h index aa0ceee74b1c..7e02d8c8ef25 100644 --- a/keyboards/jones/v1/config.h +++ b/keyboards/jones/v1/config.h @@ -27,7 +27,6 @@ along with this program. If not, see . /* Rotary Encoder */ #define ENCODERS_PAD_A { F5, D2 } #define ENCODERS_PAD_B { F4, D3 } -#define ENCODER_RESOLUTION 4 //the default & suggested is 4 /* Audio */ #ifdef AUDIO_ENABLE diff --git a/keyboards/keycapsss/plaid_pad/config.h b/keyboards/keycapsss/plaid_pad/config.h index 1bdd1187364a..5825367ac1e0 100644 --- a/keyboards/keycapsss/plaid_pad/config.h +++ b/keyboards/keycapsss/plaid_pad/config.h @@ -20,8 +20,6 @@ #define MATRIX_ROW_PINS { C0, C1, C2, C3 } #define MATRIX_COL_PINS { B0, D7, D6, D5 } -#define ENCODER_RESOLUTION 4 - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keychron/q0/rev_0131/config.h b/keyboards/keychron/q0/rev_0131/config.h index 5a31fc4e770e..78db924923c3 100644 --- a/keyboards/keychron/q0/rev_0131/config.h +++ b/keyboards/keychron/q0/rev_0131/config.h @@ -37,5 +37,4 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A3 } #define ENCODERS_PAD_B { A4 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q1/ansi_encoder/config.h b/keyboards/keychron/q1/ansi_encoder/config.h index b38261abf6b2..92dd09ccd394 100644 --- a/keyboards/keychron/q1/ansi_encoder/config.h +++ b/keyboards/keychron/q1/ansi_encoder/config.h @@ -28,6 +28,3 @@ /* Encoder used pins */ #define ENCODERS_PAD_A { E6 } #define ENCODERS_PAD_B { B7 } - -/* Specifies the number of pulses the encoder registers between each detent */ -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/keychron/q10/ansi_encoder/config.h b/keyboards/keychron/q10/ansi_encoder/config.h index d02436c01d85..9f4a4d927686 100644 --- a/keyboards/keychron/q10/ansi_encoder/config.h +++ b/keyboards/keychron/q10/ansi_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q10/iso_encoder/config.h b/keyboards/keychron/q10/iso_encoder/config.h index 7f4a57543272..9a57d5954dd4 100644 --- a/keyboards/keychron/q10/iso_encoder/config.h +++ b/keyboards/keychron/q10/iso_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q2/ansi_encoder/config.h b/keyboards/keychron/q2/ansi_encoder/config.h index 25e444933cea..997e04741c4f 100644 --- a/keyboards/keychron/q2/ansi_encoder/config.h +++ b/keyboards/keychron/q2/ansi_encoder/config.h @@ -24,5 +24,4 @@ /* Encoder used pins */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q2/iso_encoder/config.h b/keyboards/keychron/q2/iso_encoder/config.h index aa779918af28..c28005c040f7 100644 --- a/keyboards/keychron/q2/iso_encoder/config.h +++ b/keyboards/keychron/q2/iso_encoder/config.h @@ -24,5 +24,4 @@ /* Encoder used pins */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q2/jis_encoder/config.h b/keyboards/keychron/q2/jis_encoder/config.h index e0ca950bc3e4..47edae801e34 100644 --- a/keyboards/keychron/q2/jis_encoder/config.h +++ b/keyboards/keychron/q2/jis_encoder/config.h @@ -26,7 +26,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q3/ansi_encoder/config.h b/keyboards/keychron/q3/ansi_encoder/config.h index 505a45b79cf6..16e791b47b11 100644 --- a/keyboards/keychron/q3/ansi_encoder/config.h +++ b/keyboards/keychron/q3/ansi_encoder/config.h @@ -28,7 +28,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 #define CKLED2001_CURRENT_TUNE \ diff --git a/keyboards/keychron/q3/iso_encoder/config.h b/keyboards/keychron/q3/iso_encoder/config.h index 0cc5fbf1d972..3d750b18b50c 100644 --- a/keyboards/keychron/q3/iso_encoder/config.h +++ b/keyboards/keychron/q3/iso_encoder/config.h @@ -28,7 +28,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 #define CKLED2001_CURRENT_TUNE \ diff --git a/keyboards/keychron/q3/jis_encoder/config.h b/keyboards/keychron/q3/jis_encoder/config.h index 322f04cb0fc2..9c2f248baa53 100644 --- a/keyboards/keychron/q3/jis_encoder/config.h +++ b/keyboards/keychron/q3/jis_encoder/config.h @@ -33,7 +33,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable CapsLcok LED */ diff --git a/keyboards/keychron/q5/ansi_encoder/config.h b/keyboards/keychron/q5/ansi_encoder/config.h index 6aecac619e07..64fb8babc8ad 100644 --- a/keyboards/keychron/q5/ansi_encoder/config.h +++ b/keyboards/keychron/q5/ansi_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } #define ENCODERS_PAD_B { A2 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q5/iso_encoder/config.h b/keyboards/keychron/q5/iso_encoder/config.h index 3c9eee8d494a..fd73bf127cdb 100644 --- a/keyboards/keychron/q5/iso_encoder/config.h +++ b/keyboards/keychron/q5/iso_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } #define ENCODERS_PAD_B { A2 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q6/ansi_encoder/config.h b/keyboards/keychron/q6/ansi_encoder/config.h index 1949be399b07..a3c19cbe4186 100644 --- a/keyboards/keychron/q6/ansi_encoder/config.h +++ b/keyboards/keychron/q6/ansi_encoder/config.h @@ -33,7 +33,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } #define ENCODERS_PAD_B { A2 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED*/ diff --git a/keyboards/keychron/q6/iso_encoder/config.h b/keyboards/keychron/q6/iso_encoder/config.h index 63fe3a83c14e..95c596e392f6 100644 --- a/keyboards/keychron/q6/iso_encoder/config.h +++ b/keyboards/keychron/q6/iso_encoder/config.h @@ -33,7 +33,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } #define ENCODERS_PAD_B { A2 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED*/ diff --git a/keyboards/keychron/q65/ansi_encoder/config.h b/keyboards/keychron/q65/ansi_encoder/config.h index 1d04a4649ea1..99fe810f9f0a 100644 --- a/keyboards/keychron/q65/ansi_encoder/config.h +++ b/keyboards/keychron/q65/ansi_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q8/ansi_encoder/config.h b/keyboards/keychron/q8/ansi_encoder/config.h index 1d825e977018..493200fdad0f 100644 --- a/keyboards/keychron/q8/ansi_encoder/config.h +++ b/keyboards/keychron/q8/ansi_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { B5 } #define ENCODERS_PAD_B { A10 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q8/iso_encoder/config.h b/keyboards/keychron/q8/iso_encoder/config.h index 1325738f8f5f..345f40a10fbe 100644 --- a/keyboards/keychron/q8/iso_encoder/config.h +++ b/keyboards/keychron/q8/iso_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { B5 } #define ENCODERS_PAD_B { A10 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q9/ansi_encoder/config.h b/keyboards/keychron/q9/ansi_encoder/config.h index 56f4966388f0..be8de5961e14 100644 --- a/keyboards/keychron/q9/ansi_encoder/config.h +++ b/keyboards/keychron/q9/ansi_encoder/config.h @@ -23,7 +23,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { B4 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q9/iso_encoder/config.h b/keyboards/keychron/q9/iso_encoder/config.h index 0d7e2c5a5012..cbdbcc555084 100644 --- a/keyboards/keychron/q9/iso_encoder/config.h +++ b/keyboards/keychron/q9/iso_encoder/config.h @@ -23,7 +23,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { B4 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v1/ansi_encoder/config.h b/keyboards/keychron/v1/ansi_encoder/config.h index c7af3db8fa4d..06b7676225d8 100644 --- a/keyboards/keychron/v1/ansi_encoder/config.h +++ b/keyboards/keychron/v1/ansi_encoder/config.h @@ -27,7 +27,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v1/iso_encoder/config.h b/keyboards/keychron/v1/iso_encoder/config.h index 18273b3b36fb..b99639188999 100644 --- a/keyboards/keychron/v1/iso_encoder/config.h +++ b/keyboards/keychron/v1/iso_encoder/config.h @@ -27,7 +27,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v1/jis_encoder/config.h b/keyboards/keychron/v1/jis_encoder/config.h index 5a68e5dd50fd..6ade4684b8ab 100644 --- a/keyboards/keychron/v1/jis_encoder/config.h +++ b/keyboards/keychron/v1/jis_encoder/config.h @@ -27,7 +27,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v10/ansi_encoder/config.h b/keyboards/keychron/v10/ansi_encoder/config.h index 4f6891254129..09a37a75ef96 100644 --- a/keyboards/keychron/v10/ansi_encoder/config.h +++ b/keyboards/keychron/v10/ansi_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v10/iso_encoder/config.h b/keyboards/keychron/v10/iso_encoder/config.h index b064f10a604e..adfbf17e54f8 100644 --- a/keyboards/keychron/v10/iso_encoder/config.h +++ b/keyboards/keychron/v10/iso_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v2/ansi_encoder/config.h b/keyboards/keychron/v2/ansi_encoder/config.h index 51b5cf8c66a0..63dc19c951c8 100644 --- a/keyboards/keychron/v2/ansi_encoder/config.h +++ b/keyboards/keychron/v2/ansi_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v2/iso_encoder/config.h b/keyboards/keychron/v2/iso_encoder/config.h index 60d3f554fa8a..11c3726df2c3 100644 --- a/keyboards/keychron/v2/iso_encoder/config.h +++ b/keyboards/keychron/v2/iso_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v2/jis_encoder/config.h b/keyboards/keychron/v2/jis_encoder/config.h index 3c4b5ddd011b..4c0c0518f871 100644 --- a/keyboards/keychron/v2/jis_encoder/config.h +++ b/keyboards/keychron/v2/jis_encoder/config.h @@ -27,7 +27,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v3/ansi_encoder/config.h b/keyboards/keychron/v3/ansi_encoder/config.h index 6b6d2b9a1cd1..736c97bdf975 100644 --- a/keyboards/keychron/v3/ansi_encoder/config.h +++ b/keyboards/keychron/v3/ansi_encoder/config.h @@ -30,7 +30,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable CapsLcok LED */ diff --git a/keyboards/keychron/v3/iso_encoder/config.h b/keyboards/keychron/v3/iso_encoder/config.h index 8972acfe02da..c68cef1b282f 100644 --- a/keyboards/keychron/v3/iso_encoder/config.h +++ b/keyboards/keychron/v3/iso_encoder/config.h @@ -30,7 +30,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v3/jis_encoder/config.h b/keyboards/keychron/v3/jis_encoder/config.h index 3c63cd306ee0..c2a4faac49a1 100644 --- a/keyboards/keychron/v3/jis_encoder/config.h +++ b/keyboards/keychron/v3/jis_encoder/config.h @@ -33,7 +33,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { A8 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable CapsLcok LED */ diff --git a/keyboards/keychron/v5/ansi_encoder/config.h b/keyboards/keychron/v5/ansi_encoder/config.h index 659a3ea88e6c..4e1b281a3d3e 100644 --- a/keyboards/keychron/v5/ansi_encoder/config.h +++ b/keyboards/keychron/v5/ansi_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } #define ENCODERS_PAD_B { A2 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v5/iso_encoder/config.h b/keyboards/keychron/v5/iso_encoder/config.h index 49711b5d3b3f..e1fa95b8f8d8 100644 --- a/keyboards/keychron/v5/iso_encoder/config.h +++ b/keyboards/keychron/v5/iso_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } #define ENCODERS_PAD_B { A2 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v6/ansi_encoder/config.h b/keyboards/keychron/v6/ansi_encoder/config.h index c87df6a9bfd5..10db17084fd5 100644 --- a/keyboards/keychron/v6/ansi_encoder/config.h +++ b/keyboards/keychron/v6/ansi_encoder/config.h @@ -39,7 +39,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } #define ENCODERS_PAD_B { A2 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED*/ diff --git a/keyboards/keychron/v6/iso_encoder/config.h b/keyboards/keychron/v6/iso_encoder/config.h index 567db0d7b57b..6699b86bb1a1 100644 --- a/keyboards/keychron/v6/iso_encoder/config.h +++ b/keyboards/keychron/v6/iso_encoder/config.h @@ -39,7 +39,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } #define ENCODERS_PAD_B { A2 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED*/ diff --git a/keyboards/keychron/v8/ansi_encoder/config.h b/keyboards/keychron/v8/ansi_encoder/config.h index 6d749eed3757..cef883edf33b 100644 --- a/keyboards/keychron/v8/ansi_encoder/config.h +++ b/keyboards/keychron/v8/ansi_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v8/iso_encoder/config.h b/keyboards/keychron/v8/iso_encoder/config.h index b460669c2453..b8e1a5206c5a 100644 --- a/keyboards/keychron/v8/iso_encoder/config.h +++ b/keyboards/keychron/v8/iso_encoder/config.h @@ -24,7 +24,6 @@ /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keyprez/bison/config.h b/keyboards/keyprez/bison/config.h index 28e823f11f1c..6b1c7f64e7d6 100644 --- a/keyboards/keyprez/bison/config.h +++ b/keyboards/keyprez/bison/config.h @@ -38,7 +38,6 @@ along with this program. If not, see . #define ENCODERS_PAD_B { B5 } #define ENCODERS_PAD_A_RIGHT { B5 } #define ENCODERS_PAD_B_RIGHT { B6 } -#define ENCODER_RESOLUTION 4 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keyprez/corgi/config.h b/keyboards/keyprez/corgi/config.h index ac78581c42ec..99030069787e 100644 --- a/keyboards/keyprez/corgi/config.h +++ b/keyboards/keyprez/corgi/config.h @@ -30,7 +30,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { D3 } #define ENCODERS_PAD_B { D4 } -#define ENCODER_RESOLUTION 4 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keyprez/rhino/config.h b/keyboards/keyprez/rhino/config.h index 1b972e7b602e..832659eb6cef 100644 --- a/keyboards/keyprez/rhino/config.h +++ b/keyboards/keyprez/rhino/config.h @@ -36,7 +36,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { D1 } #define ENCODERS_PAD_B { D0 } -#define ENCODER_RESOLUTION 4 #define AUDIO_PIN C6 #define MUSIC_MAP diff --git a/keyboards/keyprez/unicorn/config.h b/keyboards/keyprez/unicorn/config.h index d5badd4ae15c..84bbce55cc3c 100644 --- a/keyboards/keyprez/unicorn/config.h +++ b/keyboards/keyprez/unicorn/config.h @@ -46,7 +46,5 @@ #define ENCODERS_PAD_A { D2 } #define ENCODERS_PAD_B { D4 } -#define ENCODER_RESOLUTIONS { 4 } #define ENCODERS_PAD_A_RIGHT { D2 } #define ENCODERS_PAD_B_RIGHT { D4 } -#define ENCODER_RESOLUTIONS_RIGHT {4} diff --git a/keyboards/keystonecaps/gameroyadvance/config.h b/keyboards/keystonecaps/gameroyadvance/config.h index 1aa7ff33ff4c..a4bcd20641f1 100644 --- a/keyboards/keystonecaps/gameroyadvance/config.h +++ b/keyboards/keystonecaps/gameroyadvance/config.h @@ -53,5 +53,4 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -#define ENCODER_RESOLUTION 4 #endif diff --git a/keyboards/kiwikey/borderland/config.h b/keyboards/kiwikey/borderland/config.h index 70c80d42f6f6..9a4d8403b3a1 100644 --- a/keyboards/kiwikey/borderland/config.h +++ b/keyboards/kiwikey/borderland/config.h @@ -22,7 +22,7 @@ #define ENCODERS_PAD_A { F5 } #define ENCODERS_PAD_B { F6 } -#define ENCODER_RESOLUTION 4 + #define TAP_CODE_DELAY 10 #define RGB_DI_PIN B2 diff --git a/keyboards/latincompass/latinpad/config.h b/keyboards/latincompass/latinpad/config.h index 1b0881a0d5d0..dd7b7e584fd5 100644 --- a/keyboards/latincompass/latinpad/config.h +++ b/keyboards/latincompass/latinpad/config.h @@ -80,5 +80,3 @@ along with this program. If not, see .*/ #define ENCODERS_PAD_A { B4, B5 } #define ENCODERS_PAD_B { B2, B6 } - -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/latincompass/latinpadble/config.h b/keyboards/latincompass/latinpadble/config.h index 7b6ac2038922..195ce7b3d989 100644 --- a/keyboards/latincompass/latinpadble/config.h +++ b/keyboards/latincompass/latinpadble/config.h @@ -87,6 +87,4 @@ along with this program. If not, see .*/ #define ENCODERS_PAD_A { C7 } #define ENCODERS_PAD_B { F7 } -#define ENCODER_RESOLUTION 4 - #define VIA_HAS_BROKEN_KEYCODES diff --git a/keyboards/leafcutterlabs/bigknob/config.h b/keyboards/leafcutterlabs/bigknob/config.h index 8a2391095653..4615f2707147 100644 --- a/keyboards/leafcutterlabs/bigknob/config.h +++ b/keyboards/leafcutterlabs/bigknob/config.h @@ -20,7 +20,6 @@ along with this program. If not, see . /* rotary encoder 1,2,3 closest to usb port is 0*/ #define ENCODERS_PAD_A { D0} #define ENCODERS_PAD_B { D2} -#define ENCODER_RESOLUTION 4 //default/suggested /* ws2812 RGB LED */ #define RGB_DI_PIN C7 //D3 - underglow C7 - backlight diff --git a/keyboards/lw67/config.h b/keyboards/lw67/config.h index c3aa00f56e2c..0d08408c5cfd 100644 --- a/keyboards/lw67/config.h +++ b/keyboards/lw67/config.h @@ -24,7 +24,6 @@ /*ENCODER*/ #define ENCODERS_PAD_A { F0 } #define ENCODERS_PAD_B { F1 } -#define ENCODER_RESOLUTION 4 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/macro1/config.h b/keyboards/macro1/config.h index e707daef079f..46618b5b1aac 100644 --- a/keyboards/macro1/config.h +++ b/keyboards/macro1/config.h @@ -24,7 +24,6 @@ /*ENCODER*/ #define ENCODERS_PAD_A { F0 } #define ENCODERS_PAD_B { F1 } -#define ENCODER_RESOLUTION 4 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maxr1998/pulse4k/config.h b/keyboards/maxr1998/pulse4k/config.h index dd2e02f98e98..6df8d67d0227 100644 --- a/keyboards/maxr1998/pulse4k/config.h +++ b/keyboards/maxr1998/pulse4k/config.h @@ -28,7 +28,6 @@ /* Rotary encoders */ #define ENCODERS_PAD_A { D2, F6 } #define ENCODERS_PAD_B { D3, F5 } -#define ENCODER_RESOLUTION 4 /* Combo setup */ #define COMBO_COUNT 1 diff --git a/keyboards/mechanickeys/undead60m/config.h b/keyboards/mechanickeys/undead60m/config.h index 2f06367ab839..bc88e83ddef2 100644 --- a/keyboards/mechanickeys/undead60m/config.h +++ b/keyboards/mechanickeys/undead60m/config.h @@ -53,4 +53,3 @@ /* Rotary encoder */ #define ENCODERS_PAD_A { F6 } #define ENCODERS_PAD_B { F5 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h index 9611ed6744fe..2e82c30b4094 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h @@ -93,6 +93,5 @@ #define ENCODERS_PAD_A { A4 } #define ENCODERS_PAD_B { A3 } -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h index faf032647fba..823a92670098 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h @@ -116,6 +116,6 @@ along with this program. If not, see . #ifdef ENCODER_ENABLE #define ENCODERS_PAD_A { B12 } #define ENCODERS_PAD_B { B13 } -#define ENCODER_RESOLUTION 4 + #define TAP_CODE_DELAY 10 #endif diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h b/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h index 69af2941a645..0c95c05ab196 100644 --- a/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h @@ -2,6 +2,5 @@ #define ENCODERS_PAD_A { A6, A4, B7 } #define ENCODERS_PAD_B { A5, A3, B6 } -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h b/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h index 70fa00220b7f..c8d13c75324e 100644 --- a/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h @@ -18,6 +18,5 @@ along with this program. If not, see . #define ENCODERS_PAD_A { A6, A4, B7 } #define ENCODERS_PAD_B { A5, A3, B6 } -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h index 4605d08efbc3..1e55c8583c5e 100644 --- a/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h @@ -50,6 +50,5 @@ along with this program. If not, see . #define ENCODERS_PAD_A { D3, D5, C7 } #define ENCODERS_PAD_B { D2, B6, C6 } -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 diff --git a/keyboards/mechlovin/foundation/config.h b/keyboards/mechlovin/foundation/config.h index 73d42d4a496a..0c8d813cfa98 100644 --- a/keyboards/mechlovin/foundation/config.h +++ b/keyboards/mechlovin/foundation/config.h @@ -59,5 +59,4 @@ along with this program. If not, see . #define ENCODERS_PAD_A { C13 } #define ENCODERS_PAD_B { C14 } -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/mechlovin/hex6c/config.h b/keyboards/mechlovin/hex6c/config.h index 55ec2080d846..afdb6c047f43 100644 --- a/keyboards/mechlovin/hex6c/config.h +++ b/keyboards/mechlovin/hex6c/config.h @@ -41,7 +41,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { A15 } #define ENCODERS_PAD_B { A2 } -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 diff --git a/keyboards/mechlovin/zed65/no_backlight/retro66/config.h b/keyboards/mechlovin/zed65/no_backlight/retro66/config.h index cbc575ab938e..1183d645e58e 100644 --- a/keyboards/mechlovin/zed65/no_backlight/retro66/config.h +++ b/keyboards/mechlovin/zed65/no_backlight/retro66/config.h @@ -26,6 +26,4 @@ along with this program. If not, see . #define ENCODERS_PAD_A { B4, B6 } #define ENCODERS_PAD_B { B8, B9 } - -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/mechwild/bde/rev2/config.h b/keyboards/mechwild/bde/rev2/config.h index 3d045762ca73..98077a692f99 100644 --- a/keyboards/mechwild/bde/rev2/config.h +++ b/keyboards/mechwild/bde/rev2/config.h @@ -21,7 +21,4 @@ along with this program. If not, see . #define ENCODERS_PAD_A { D2 } #define ENCODERS_PAD_B { D3 } -/* Encoder resolution */ -#define ENCODER_RESOLUTION 4 - #define OLED_FONT_H "keyboards/mechwild/bde/lib/rev2.c" diff --git a/keyboards/mechwild/clunker/config.h b/keyboards/mechwild/clunker/config.h index 19dab9b25d20..8e2b3a7c0a47 100644 --- a/keyboards/mechwild/clunker/config.h +++ b/keyboards/mechwild/clunker/config.h @@ -21,6 +21,5 @@ #define ENCODERS_PAD_A { D2 } #define ENCODERS_PAD_B { D3 } -#define ENCODER_RESOLUTION 4 #define SOLENOID_PIN F4 diff --git a/keyboards/mechwild/mercutio/config.h b/keyboards/mechwild/mercutio/config.h index 98bfeb56254b..d6b31440e712 100755 --- a/keyboards/mechwild/mercutio/config.h +++ b/keyboards/mechwild/mercutio/config.h @@ -26,8 +26,6 @@ #define ENCODERS_PAD_A { B4 } #define ENCODERS_PAD_B { B5 } -/* encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW or ROW2COL */ diff --git a/keyboards/mechwild/mokulua/mirrored/config.h b/keyboards/mechwild/mokulua/mirrored/config.h index 0638945b9024..cc8980dd014b 100644 --- a/keyboards/mechwild/mokulua/mirrored/config.h +++ b/keyboards/mechwild/mokulua/mirrored/config.h @@ -12,8 +12,6 @@ #define ENCODERS_PAD_A { D2 } #define ENCODERS_PAD_B { B2 } -/* Encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/mokulua/standard/config.h b/keyboards/mechwild/mokulua/standard/config.h index db224094db83..443341a33cce 100644 --- a/keyboards/mechwild/mokulua/standard/config.h +++ b/keyboards/mechwild/mokulua/standard/config.h @@ -12,8 +12,6 @@ #define ENCODERS_PAD_A { D2 } #define ENCODERS_PAD_B { B2 } -/* Encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/murphpad/config.h b/keyboards/mechwild/murphpad/config.h index b190f9af869f..3b0d3981e8ad 100644 --- a/keyboards/mechwild/murphpad/config.h +++ b/keyboards/mechwild/murphpad/config.h @@ -26,8 +26,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { E6, D2 } #define ENCODERS_PAD_B { B4, D3 } -/* Encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/obe/config.h b/keyboards/mechwild/obe/config.h index 25f9b62394d0..e58967c64dea 100644 --- a/keyboards/mechwild/obe/config.h +++ b/keyboards/mechwild/obe/config.h @@ -35,8 +35,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { B5 } #define ENCODERS_PAD_B { B4 } -/* encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/puckbuddy/config.h b/keyboards/mechwild/puckbuddy/config.h index 0487c5322acc..b21e2c8a964f 100644 --- a/keyboards/mechwild/puckbuddy/config.h +++ b/keyboards/mechwild/puckbuddy/config.h @@ -46,8 +46,6 @@ #define ENCODERS_PAD_A { B1, B3 } #define ENCODERS_PAD_B { B0, A15 } -/* encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/waka60/config.h b/keyboards/mechwild/waka60/config.h index 5403cd0ddcb2..06283c030438 100644 --- a/keyboards/mechwild/waka60/config.h +++ b/keyboards/mechwild/waka60/config.h @@ -35,8 +35,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { A3 } #define ENCODERS_PAD_B { A2 } -/* encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/merge/iso_macro/config.h b/keyboards/merge/iso_macro/config.h index b662589523fc..c038b62073a6 100644 --- a/keyboards/merge/iso_macro/config.h +++ b/keyboards/merge/iso_macro/config.h @@ -27,4 +27,3 @@ #define ENCODERS_PAD_A { F0, D0 } #define ENCODERS_PAD_B { F1, D1 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/merge/uc1/config.h b/keyboards/merge/uc1/config.h index 488b2cfed352..cc72c0910a0f 100644 --- a/keyboards/merge/uc1/config.h +++ b/keyboards/merge/uc1/config.h @@ -42,4 +42,3 @@ #define ENCODERS_PAD_A { F5 } #define ENCODERS_PAD_B { F6 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/millipad/config.h b/keyboards/millipad/config.h index bbdf124f0e9b..7b14a34e92d2 100644 --- a/keyboards/millipad/config.h +++ b/keyboards/millipad/config.h @@ -42,4 +42,3 @@ along with this program. If not, see . #define ENCODERS_PAD_A { D3 } #define ENCODERS_PAD_B { D2 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/mlego/m48/rev1/config.h b/keyboards/mlego/m48/rev1/config.h index ab6ad4893833..53fbffa87865 100644 --- a/keyboards/mlego/m48/rev1/config.h +++ b/keyboards/mlego/m48/rev1/config.h @@ -26,7 +26,6 @@ { A0 } #define ENCODERS_PAD_B \ { B8 } -#define ENCODER_RESOLUTION 4 #endif #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/mlego/m60_split/rev1/config.h b/keyboards/mlego/m60_split/rev1/config.h index adb8bd0783f9..248097b2f494 100644 --- a/keyboards/mlego/m60_split/rev1/config.h +++ b/keyboards/mlego/m60_split/rev1/config.h @@ -32,8 +32,6 @@ { A0 } #define ENCODERS_PAD_B \ { B8 } -#define ENCODER_RESOLUTIONS \ - { 4 } #endif #define SPLIT_LAYER_STATE_ENABLE diff --git a/keyboards/mlego/m60_split/rev2/config.h b/keyboards/mlego/m60_split/rev2/config.h index e5ebf9343824..0fca6fcd0a95 100644 --- a/keyboards/mlego/m60_split/rev2/config.h +++ b/keyboards/mlego/m60_split/rev2/config.h @@ -33,9 +33,6 @@ { A0 } #define ENCODERS_PAD_B \ { B8 } -#define ENCODER_RESOLUTIONS \ - { 4 } - #endif #define SPLIT_LAYER_STATE_ENABLE diff --git a/keyboards/mlego/m65/rev1/config.h b/keyboards/mlego/m65/rev1/config.h index ac1f935350cb..4362e46c7e80 100644 --- a/keyboards/mlego/m65/rev1/config.h +++ b/keyboards/mlego/m65/rev1/config.h @@ -33,8 +33,6 @@ along with this program. If not, see . #define RGBLIGHT_LAYERS -#define ENCODER_RESOLUTION 4 - #undef RGBLED_NUM #define RGBLED_NUM 20 #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/mlego/m65/rev2/config.h b/keyboards/mlego/m65/rev2/config.h index 3c2e87755057..d72c039e3e55 100644 --- a/keyboards/mlego/m65/rev2/config.h +++ b/keyboards/mlego/m65/rev2/config.h @@ -33,8 +33,6 @@ along with this program. If not, see . #define RGBLIGHT_LAYERS -#define ENCODER_RESOLUTION 4 - #undef RGBLED_NUM #define RGBLED_NUM 20 #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/mlego/m65/rev3/config.h b/keyboards/mlego/m65/rev3/config.h index abeaeffc8886..84b8fe7d46cd 100644 --- a/keyboards/mlego/m65/rev3/config.h +++ b/keyboards/mlego/m65/rev3/config.h @@ -29,7 +29,6 @@ along with this program. If not, see . { A0 } #define ENCODERS_PAD_B \ { B6 } -#define ENCODER_RESOLUTION 4 #endif #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/mlego/m65/rev4/config.h b/keyboards/mlego/m65/rev4/config.h index c2bd69f3638c..0943216c6778 100644 --- a/keyboards/mlego/m65/rev4/config.h +++ b/keyboards/mlego/m65/rev4/config.h @@ -29,7 +29,6 @@ along with this program. If not, see . { A0 } #define ENCODERS_PAD_B \ { B6 } -#define ENCODER_RESOLUTION 4 #endif #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/neito/config.h b/keyboards/neito/config.h index 1aa349df4c41..1e3440026bcf 100644 --- a/keyboards/neito/config.h +++ b/keyboards/neito/config.h @@ -21,7 +21,6 @@ #define DIODE_DIRECTION COL2ROW #define ENCODERS_PAD_A { B7 } #define ENCODERS_PAD_B { B0 } -#define ENCODER_RESOLUTION 4 #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/nixkeyboards/day_off/config.h b/keyboards/nixkeyboards/day_off/config.h index 0d85df499763..92b9c01ec898 100644 --- a/keyboards/nixkeyboards/day_off/config.h +++ b/keyboards/nixkeyboards/day_off/config.h @@ -28,4 +28,3 @@ { B0 } #define ENCODERS_PAD_B \ { B1 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/owlab/voice65/hotswap/config.h b/keyboards/owlab/voice65/hotswap/config.h index d41fc84295d9..45d139d27701 100644 --- a/keyboards/owlab/voice65/hotswap/config.h +++ b/keyboards/owlab/voice65/hotswap/config.h @@ -114,5 +114,5 @@ along with this program. If not, see . /* Encoder */ #define ENCODERS_PAD_A { B4 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 + #define TAP_CODE_DELAY 10 diff --git a/keyboards/owlab/voice65/soldered/config.h b/keyboards/owlab/voice65/soldered/config.h index fb6cb8c7aab7..454e7bb36487 100644 --- a/keyboards/owlab/voice65/soldered/config.h +++ b/keyboards/owlab/voice65/soldered/config.h @@ -115,5 +115,5 @@ along with this program. If not, see . /* Encoder */ #define ENCODERS_PAD_A { B4 } #define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 4 + #define TAP_CODE_DELAY 10 diff --git a/keyboards/pauperboards/brick/info.json b/keyboards/pauperboards/brick/info.json index a5dd2522cd65..62a104a337b6 100644 --- a/keyboards/pauperboards/brick/info.json +++ b/keyboards/pauperboards/brick/info.json @@ -28,7 +28,7 @@ }, "encoder": { "rotary": [ - { "pin_a": "F4", "pin_b": "F5", "resolution": 4 } + { "pin_a": "F4", "pin_b": "F5" } ] }, "rgblight": { diff --git a/keyboards/pica40/rev2/rev2.h b/keyboards/pica40/rev2/rev2.h index 473011fbb030..95932f781788 100644 --- a/keyboards/pica40/rev2/rev2.h +++ b/keyboards/pica40/rev2/rev2.h @@ -16,7 +16,4 @@ # ifndef ENCODER_MAP_KEY_DELAY # define ENCODER_MAP_KEY_DELAY 2 # endif -# ifndef ENCODER_RESOLUTION -# define ENCODER_RESOLUTION 4 -# endif #endif diff --git a/keyboards/psuieee/pluto12/config.h b/keyboards/psuieee/pluto12/config.h index bcadefe2ff59..0404bac74215 100644 --- a/keyboards/psuieee/pluto12/config.h +++ b/keyboards/psuieee/pluto12/config.h @@ -11,7 +11,6 @@ /* Encoder Assignments */ #define ENCODERS_PAD_A { B6 } #define ENCODERS_PAD_B { B2 } -#define ENCODER_RESOLUTION 4 /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/qpockets/eggman/config.h b/keyboards/qpockets/eggman/config.h index c86f64f0894b..1e3d900e32f9 100644 --- a/keyboards/qpockets/eggman/config.h +++ b/keyboards/qpockets/eggman/config.h @@ -27,6 +27,3 @@ /* ROTARY ENCODERS */ #define ENCODERS_PAD_A { C6, D4 } #define ENCODERS_PAD_B { C7, D5 } - -#define ENCODER_RESOLUTION 4 -//#define ENCODER_DIRECTION_FLIP diff --git a/keyboards/qpockets/wanten/config.h b/keyboards/qpockets/wanten/config.h index 4672368ef556..0d980a23372f 100644 --- a/keyboards/qpockets/wanten/config.h +++ b/keyboards/qpockets/wanten/config.h @@ -38,9 +38,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { F5, D6 } #define ENCODERS_PAD_B { F6, D7 } -#define ENCODER_RESOLUTION 4 -//#define ENCODER_DIRECTION_FLIP - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/rainkeebs/rainkeeb/config.h b/keyboards/rainkeebs/rainkeeb/config.h index 8f7a2d219191..4614d50da82a 100644 --- a/keyboards/rainkeebs/rainkeeb/config.h +++ b/keyboards/rainkeebs/rainkeeb/config.h @@ -32,4 +32,3 @@ /* encoder pads */ #define ENCODERS_PAD_A { B2 } #define ENCODERS_PAD_B { B6 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/rart/rart75hs/config.h b/keyboards/rart/rart75hs/config.h index dec3ab7cc22f..f6fa7bf18c51 100644 --- a/keyboards/rart/rart75hs/config.h +++ b/keyboards/rart/rart75hs/config.h @@ -33,7 +33,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { C1 } #define ENCODERS_PAD_B { C2 } -#define ENCODER_RESOLUTION 4 //default/suggested #define RGB_DI_PIN C0 #ifdef RGB_DI_PIN diff --git a/keyboards/redox_media/config.h b/keyboards/redox_media/config.h index 587d3e0cc058..99fa148a0d3f 100644 --- a/keyboards/redox_media/config.h +++ b/keyboards/redox_media/config.h @@ -32,4 +32,3 @@ along with this program. If not, see . #define ENCODERS_PAD_A { F4 } #define ENCODERS_PAD_B { F5 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/reedskeebs/alish40/info.json b/keyboards/reedskeebs/alish40/info.json index c1ae80e9cdfc..a4f862bec999 100644 --- a/keyboards/reedskeebs/alish40/info.json +++ b/keyboards/reedskeebs/alish40/info.json @@ -8,8 +8,7 @@ "rotary": [ { "pin_a": "B4", - "pin_b": "B5", - "resolution": 4 + "pin_b": "B5" } ] }, diff --git a/keyboards/rgbkb/pan/config.h b/keyboards/rgbkb/pan/config.h index 6f5c2c1db629..05d446d05da6 100644 --- a/keyboards/rgbkb/pan/config.h +++ b/keyboards/rgbkb/pan/config.h @@ -16,8 +16,6 @@ along with this program. If not, see . #pragma once - -#define ENCODER_RESOLUTION 4 #define RGBLED_NUM 64 #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/ristretto/config.h b/keyboards/ristretto/config.h index 286bb0397f8c..9759cc3f9a0e 100644 --- a/keyboards/ristretto/config.h +++ b/keyboards/ristretto/config.h @@ -32,4 +32,3 @@ #define ENCODERS_PAD_A { D4 } #define ENCODERS_PAD_B { D6 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/sawnsprojects/krush/krush65/solder/config.h b/keyboards/sawnsprojects/krush/krush65/solder/config.h index 22303a478df9..c834e35158fb 100644 --- a/keyboards/sawnsprojects/krush/krush65/solder/config.h +++ b/keyboards/sawnsprojects/krush/krush65/solder/config.h @@ -26,7 +26,6 @@ /* rotary */ #define ENCODERS_PAD_A { D0 } #define ENCODERS_PAD_B { B3 } -#define ENCODER_RESOLUTION 4 #define RGB_DI_PIN F1 #ifdef RGB_DI_PIN diff --git a/keyboards/sofle/keyhive/config.h b/keyboards/sofle/keyhive/config.h index a3caf29ac4d2..43edc5db9952 100755 --- a/keyboards/sofle/keyhive/config.h +++ b/keyboards/sofle/keyhive/config.h @@ -31,7 +31,6 @@ #define ENCODERS_PAD_B { F4 } #define ENCODERS_PAD_A_RIGHT { F4 } #define ENCODERS_PAD_B_RIGHT { F5 } -#define ENCODER_RESOLUTIONS { 4 } #define ENCODER_RESOLUTIONS_RIGHT { 2 } // Left encoder seems to have double-output issue but right does not. #define TAP_CODE_DELAY 10 diff --git a/keyboards/spacey/config.h b/keyboards/spacey/config.h index 2f9127e4e855..53c7910f085a 100644 --- a/keyboards/spacey/config.h +++ b/keyboards/spacey/config.h @@ -20,7 +20,6 @@ along with this program. If not, see . #define ENCODERS_PAD_A { D0 } #define ENCODERS_PAD_B { D1 } -#define ENCODER_RESOLUTION 4 /* * Keyboard Matrix Assignments diff --git a/keyboards/sthlmkb/lagom/info.json b/keyboards/sthlmkb/lagom/info.json index 932ba359d3fd..410d22512efa 100644 --- a/keyboards/sthlmkb/lagom/info.json +++ b/keyboards/sthlmkb/lagom/info.json @@ -396,8 +396,8 @@ }, "encoder": { "rotary": [ - { "pin_a": "D4", "pin_b": "C6", "resolution": 4 }, - { "pin_a": "F4", "pin_b": "F5", "resolution": 4 } + { "pin_a": "D4", "pin_b": "C6" }, + { "pin_a": "F4", "pin_b": "F5" } ] } } diff --git a/keyboards/sthlmkb/litl/info.json b/keyboards/sthlmkb/litl/info.json index 8340eb83725a..232ada4bace9 100644 --- a/keyboards/sthlmkb/litl/info.json +++ b/keyboards/sthlmkb/litl/info.json @@ -43,7 +43,7 @@ }, "encoder": { "rotary": [ - { "pin_a": "D3", "pin_b": "D2", "resolution": 4 } + { "pin_a": "D3", "pin_b": "D2" } ] } } diff --git a/keyboards/synapse/config.h b/keyboards/synapse/config.h index 0c3df697ef4e..2ba435289af0 100644 --- a/keyboards/synapse/config.h +++ b/keyboards/synapse/config.h @@ -32,6 +32,4 @@ #define ENCODERS_PAD_B \ { D6, C6 } -#define ENCODER_RESOLUTION 4 - #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/synthlabs/solo/config.h b/keyboards/synthlabs/solo/config.h index da4499d8dd7b..f38b8646dccd 100644 --- a/keyboards/synthlabs/solo/config.h +++ b/keyboards/synthlabs/solo/config.h @@ -5,7 +5,6 @@ #define ENCODERS 1 -#define ENCODER_RESOLUTION 4 #define ENCODERS_PAD_A { B2 } #define ENCODERS_PAD_B { B3 } #define ENCODERS_CW_KEY { { 2, 1 } } diff --git a/keyboards/takashicompany/compacx/config.h b/keyboards/takashicompany/compacx/config.h index 24641f2071b9..848c5fb4e5eb 100644 --- a/keyboards/takashicompany/compacx/config.h +++ b/keyboards/takashicompany/compacx/config.h @@ -34,7 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODER_RESOLUTION 4 #define ENCODERS_PAD_A { E6, B6 } #define ENCODERS_PAD_B { B4, B5 } diff --git a/keyboards/takashicompany/dogtag/config.h b/keyboards/takashicompany/dogtag/config.h index dc75fc44aba5..607afc15b9d5 100644 --- a/keyboards/takashicompany/dogtag/config.h +++ b/keyboards/takashicompany/dogtag/config.h @@ -37,7 +37,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODER_RESOLUTION 4 #define ENCODERS_PAD_A { D4 } #define ENCODERS_PAD_B { C6 } diff --git a/keyboards/takashicompany/spreadwriter/config.h b/keyboards/takashicompany/spreadwriter/config.h index 99bbfdf6713f..6bd03e2221e0 100644 --- a/keyboards/takashicompany/spreadwriter/config.h +++ b/keyboards/takashicompany/spreadwriter/config.h @@ -3,7 +3,5 @@ #pragma once - -#define ENCODER_RESOLUTION 4 #define ENCODERS_PAD_A { D1 } #define ENCODERS_PAD_B { D0 } diff --git a/keyboards/unison/v04/config.h b/keyboards/unison/v04/config.h index 4e95b4bba164..5adf813c3f70 100644 --- a/keyboards/unison/v04/config.h +++ b/keyboards/unison/v04/config.h @@ -29,7 +29,6 @@ along with this program. If not, see . #ifdef ENCODER_ENABLE #define ENCODERS_PAD_A { B0, D2, D5, D6, B4 } #define ENCODERS_PAD_B { B1, D3, D4, D7, B5 } - #define ENCODER_RESOLUTION 4 //the default & suggested is 4 #endif /* Audio */ diff --git a/keyboards/winry/winry315/config.h b/keyboards/winry/winry315/config.h index f093f88b95bf..23efd398166a 100644 --- a/keyboards/winry/winry315/config.h +++ b/keyboards/winry/winry315/config.h @@ -11,7 +11,6 @@ // 2 - right #define ENCODERS_PAD_A { F1, B0, B3 } #define ENCODERS_PAD_B { F0, B1, B7 } -#define ENCODER_RESOLUTION 4 // Encoder mappings (used for VIA). #define ENCODERS 3 From 9ce5bc303be08a429cd29a7330725e2ce7d883aa Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:30:27 +1100 Subject: [PATCH 02/31] Move encoder config to info.json, 0-9 --- keyboards/0xcb/1337/config.h | 3 --- keyboards/0xcb/1337/info.json | 5 +++++ keyboards/0xcb/static/config.h | 3 --- keyboards/0xcb/static/info.json | 5 +++++ keyboards/10bleoledhub/config.h | 3 --- keyboards/10bleoledhub/info.json | 5 +++++ keyboards/1upkeyboards/pi40/config.h | 3 --- keyboards/1upkeyboards/pi40/info.json | 5 +++++ keyboards/1upkeyboards/super16v2/config.h | 4 ---- keyboards/1upkeyboards/super16v2/info.json | 6 ++++++ keyboards/25keys/aleth42/rev0/config.h | 3 --- keyboards/25keys/aleth42/rev0/info.json | 6 ++++++ keyboards/25keys/aleth42/rev1/config.h | 3 --- keyboards/25keys/aleth42/rev1/info.json | 6 ++++++ keyboards/25keys/cassette42/config.h | 3 --- keyboards/25keys/cassette42/info.json | 6 ++++++ keyboards/2key2crawl/config.h | 5 ----- keyboards/2key2crawl/info.json | 5 +++++ keyboards/45_ats/config.h | 4 ---- keyboards/45_ats/info.json | 5 +++++ keyboards/7c8/framework/config.h | 2 -- keyboards/7c8/framework/info.json | 5 +++++ 22 files changed, 59 insertions(+), 36 deletions(-) diff --git a/keyboards/0xcb/1337/config.h b/keyboards/0xcb/1337/config.h index 801e2d49507a..e68213df1862 100644 --- a/keyboards/0xcb/1337/config.h +++ b/keyboards/0xcb/1337/config.h @@ -20,9 +20,6 @@ along with this program. If not, see . #define TAP_CODE_DELAY 10 -#define ENCODERS_PAD_A { F6 } -#define ENCODERS_PAD_B { F5 } - #define BACKLIGHT_PIN B5 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 7 diff --git a/keyboards/0xcb/1337/info.json b/keyboards/0xcb/1337/info.json index d37fc515f791..cef20acb6a83 100644 --- a/keyboards/0xcb/1337/info.json +++ b/keyboards/0xcb/1337/info.json @@ -8,6 +8,11 @@ "pid": "0x1337", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F5"} + ] + }, "qmk_lufa_bootloader": { "led": "B0" }, diff --git a/keyboards/0xcb/static/config.h b/keyboards/0xcb/static/config.h index 3a0fe0027f76..f77002e8ab7e 100644 --- a/keyboards/0xcb/static/config.h +++ b/keyboards/0xcb/static/config.h @@ -35,9 +35,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define TAP_CODE_DELAY 10 - -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D1 } // clang-format on /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/0xcb/static/info.json b/keyboards/0xcb/static/info.json index b6e5f01b2720..a18bd7b3136e 100644 --- a/keyboards/0xcb/static/info.json +++ b/keyboards/0xcb/static/info.json @@ -8,6 +8,11 @@ "pid": "0xA455", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "processor": "atmega328p", "bootloader": "usbasploader", "layout_aliases": { diff --git a/keyboards/10bleoledhub/config.h b/keyboards/10bleoledhub/config.h index 6d356efaf69c..594356466132 100644 --- a/keyboards/10bleoledhub/config.h +++ b/keyboards/10bleoledhub/config.h @@ -40,6 +40,3 @@ along with this program. If not, see .*/ #define OLED_FONT_H "./lib/glcdfont.c" - -#define ENCODERS_PAD_A { C7 } -#define ENCODERS_PAD_B { F7 } diff --git a/keyboards/10bleoledhub/info.json b/keyboards/10bleoledhub/info.json index 84dea67c3ad4..dd106a74a50e 100644 --- a/keyboards/10bleoledhub/info.json +++ b/keyboards/10bleoledhub/info.json @@ -8,6 +8,11 @@ "pid": "0x7C99", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C7", "pin_b": "F7"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/1upkeyboards/pi40/config.h b/keyboards/1upkeyboards/pi40/config.h index 6d19ace806c4..dfed1e4e6f17 100644 --- a/keyboards/1upkeyboards/pi40/config.h +++ b/keyboards/1upkeyboards/pi40/config.h @@ -20,9 +20,6 @@ #define MATRIX_ROW_PINS { GP21, GP20, GP19, GP18 } #define MATRIX_COL_PINS { GP1, GP2, GP3, GP4, GP5, GP6, GP7, GP8, GP9, GP10, GP11, GP12 } -#define ENCODERS_PAD_A { GP14 } -#define ENCODERS_PAD_B { GP13 } - #define RGB_DI_PIN GP0 #define RGB_MATRIX_LED_COUNT 47 #define RGBLED_NUM 47 diff --git a/keyboards/1upkeyboards/pi40/info.json b/keyboards/1upkeyboards/pi40/info.json index 0f8bee6efe81..42c0bc7b1294 100644 --- a/keyboards/1upkeyboards/pi40/info.json +++ b/keyboards/1upkeyboards/pi40/info.json @@ -6,6 +6,11 @@ "pid": "0x5600", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "GP14", "pin_b": "GP13"} + ] + }, "processor": "RP2040", "bootloader": "rp2040", "board": "GENERIC_RP_RP2040", diff --git a/keyboards/1upkeyboards/super16v2/config.h b/keyboards/1upkeyboards/super16v2/config.h index f71b6b794290..04f5fdd9793a 100644 --- a/keyboards/1upkeyboards/super16v2/config.h +++ b/keyboards/1upkeyboards/super16v2/config.h @@ -34,10 +34,6 @@ #define MATRIX_ROW_PINS { D1, D2, D3, D4 } #define MATRIX_COL_PINS { D5, D6, C2, D0 } -#define ENCODERS_PAD_A { B1, B3 } -#define ENCODERS_PAD_B { B2, B4 } - - /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/1upkeyboards/super16v2/info.json b/keyboards/1upkeyboards/super16v2/info.json index 7886ce228e63..13e2c55fa595 100644 --- a/keyboards/1upkeyboards/super16v2/info.json +++ b/keyboards/1upkeyboards/super16v2/info.json @@ -8,6 +8,12 @@ "pid": "0x5517", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B2"}, + {"pin_a": "B3", "pin_b": "B4"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/25keys/aleth42/rev0/config.h b/keyboards/25keys/aleth42/rev0/config.h index b84cc698e445..eb8bd97b590f 100644 --- a/keyboards/25keys/aleth42/rev0/config.h +++ b/keyboards/25keys/aleth42/rev0/config.h @@ -25,9 +25,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B6, B5 } // located @ upper left -#define ENCODERS_PAD_B { B7, B4 } // located @ bottom left - #define RGB_DI_PIN C7 #ifdef RGB_DI_PIN #define RGBLED_NUM 6 diff --git a/keyboards/25keys/aleth42/rev0/info.json b/keyboards/25keys/aleth42/rev0/info.json index acb5cc585504..18023c847efe 100644 --- a/keyboards/25keys/aleth42/rev0/info.json +++ b/keyboards/25keys/aleth42/rev0/info.json @@ -2,6 +2,12 @@ "usb": { "device_version": "0.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B7"}, + {"pin_a": "B5", "pin_b": "B4"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu" } diff --git a/keyboards/25keys/aleth42/rev1/config.h b/keyboards/25keys/aleth42/rev1/config.h index fe28b50352db..f143be4040d1 100644 --- a/keyboards/25keys/aleth42/rev1/config.h +++ b/keyboards/25keys/aleth42/rev1/config.h @@ -25,9 +25,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B5, F5 } -#define ENCODERS_PAD_B { B6, F6 } - #define BACKLIGHT_PIN C6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 8 diff --git a/keyboards/25keys/aleth42/rev1/info.json b/keyboards/25keys/aleth42/rev1/info.json index dab37baf0456..2baaf76d07a4 100644 --- a/keyboards/25keys/aleth42/rev1/info.json +++ b/keyboards/25keys/aleth42/rev1/info.json @@ -2,6 +2,12 @@ "usb": { "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B6"}, + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu" } diff --git a/keyboards/25keys/cassette42/config.h b/keyboards/25keys/cassette42/config.h index 003daa91cc38..686eea8fc759 100644 --- a/keyboards/25keys/cassette42/config.h +++ b/keyboards/25keys/cassette42/config.h @@ -17,9 +17,6 @@ along with this program. If not, see . #pragma once -#define ENCODERS_PAD_A { B6, B3 } -#define ENCODERS_PAD_B { B2, B1 } - #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN # define RGBLED_NUM 5 diff --git a/keyboards/25keys/cassette42/info.json b/keyboards/25keys/cassette42/info.json index 280733feb92c..f791a83e4817 100644 --- a/keyboards/25keys/cassette42/info.json +++ b/keyboards/25keys/cassette42/info.json @@ -8,6 +8,12 @@ "pid": "0xCA42", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B2"}, + {"pin_a": "B3", "pin_b": "B1"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/2key2crawl/config.h b/keyboards/2key2crawl/config.h index 6025ba1d0130..67a1b481577a 100644 --- a/keyboards/2key2crawl/config.h +++ b/keyboards/2key2crawl/config.h @@ -5,11 +5,6 @@ #define MATRIX_ROW_PINS { C4, C5 } #define MATRIX_COL_PINS { B3, B4, B5, B6, B7, C7, B2 } - -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D1 } -#define ENCODER_RESOLUTION 1 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/2key2crawl/info.json b/keyboards/2key2crawl/info.json index a50d646244c2..e4ab7f79a954 100644 --- a/keyboards/2key2crawl/info.json +++ b/keyboards/2key2crawl/info.json @@ -8,6 +8,11 @@ "pid": "0x6090", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1", "resolution": 1} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/45_ats/config.h b/keyboards/45_ats/config.h index 734bc8d737c7..fcf2f8ea44f2 100644 --- a/keyboards/45_ats/config.h +++ b/keyboards/45_ats/config.h @@ -18,10 +18,6 @@ #pragma once - -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } - /* key matrix pins */ #define MATRIX_ROW_PINS { D3, D5, D7, D6 } #define MATRIX_COL_PINS { E6, B0, B1, B2, B3, B7, F6, F5, F4, C7, F7, C6, B6, D4 } diff --git a/keyboards/45_ats/info.json b/keyboards/45_ats/info.json index 530c2f3031a1..0bf42f9a75e0 100644 --- a/keyboards/45_ats/info.json +++ b/keyboards/45_ats/info.json @@ -8,6 +8,11 @@ "pid": "0x4511", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/7c8/framework/config.h b/keyboards/7c8/framework/config.h index 7501c116e7be..ba7016ab340e 100644 --- a/keyboards/7c8/framework/config.h +++ b/keyboards/7c8/framework/config.h @@ -18,8 +18,6 @@ #define MATRIX_ROW_PINS { B0, B1, D7, B2, D6, B3, D5, B4, D4, B5 } #define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5 } -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D1 } #define TAP_CODE_DELAY 16 #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/7c8/framework/info.json b/keyboards/7c8/framework/info.json index a9871f774556..ca440e9a76ed 100644 --- a/keyboards/7c8/framework/info.json +++ b/keyboards/7c8/framework/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "processor": "atmega328p", "bootloader": "usbasploader", "layouts": { From f3bcaed29525f594a12014a4cdd4399571bb2a23 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:30:56 +1100 Subject: [PATCH 03/31] Move encoder config to info.json, A --- keyboards/abacus/config.h | 3 --- keyboards/abacus/info.json | 5 +++++ keyboards/abstract/ellipse/rev1/config.h | 4 ---- keyboards/abstract/ellipse/rev1/info.json | 7 +++++++ keyboards/acheron/shark/alpha/config.h | 5 ----- keyboards/acheron/shark/alpha/info.json | 5 +++++ keyboards/acheron/shark/beta/config.h | 3 --- keyboards/acheron/shark/beta/info.json | 5 +++++ keyboards/adafruit/macropad/config.h | 4 ---- keyboards/adafruit/macropad/info.json | 5 +++++ keyboards/adpenrose/akemipad/config.h | 2 -- keyboards/adpenrose/akemipad/info.json | 5 +++++ keyboards/adpenrose/kintsugi/config.h | 2 -- keyboards/adpenrose/kintsugi/info.json | 5 +++++ keyboards/adpenrose/obi/config.h | 2 -- keyboards/adpenrose/obi/info.json | 5 +++++ keyboards/aidansmithdotdev/fine40/config.h | 5 ----- keyboards/aidansmithdotdev/fine40/info.json | 5 +++++ keyboards/aleblazer/zodiark/config.h | 6 ------ keyboards/aleblazer/zodiark/info.json | 14 ++++++++++++- keyboards/ano/config.h | 5 ----- keyboards/ano/info.json | 5 +++++ keyboards/aplyard/aplx6/rev2/config.h | 4 ---- keyboards/aplyard/aplx6/rev2/info.json | 5 +++++ keyboards/arrayperipherals/1x4p1/config.h | 22 --------------------- keyboards/arrayperipherals/1x4p1/info.json | 5 +++++ keyboards/atlantis/ak81_ve/config.h | 3 --- keyboards/atlantis/ak81_ve/info.json | 5 +++++ keyboards/atreyu/rev1/config.h | 6 ------ keyboards/atreyu/rev1/info.json | 14 +++++++++++++ keyboards/atreyu/rev2/config.h | 4 ---- keyboards/atreyu/rev2/info.json | 6 ++++++ keyboards/avalanche/v2/config.h | 4 ---- keyboards/avalanche/v2/info.json | 5 +++++ keyboards/avalanche/v3/config.h | 4 ---- keyboards/avalanche/v3/info.json | 5 +++++ keyboards/avalanche/v4/config.h | 4 ---- keyboards/avalanche/v4/info.json | 5 +++++ 38 files changed, 115 insertions(+), 93 deletions(-) delete mode 100644 keyboards/arrayperipherals/1x4p1/config.h diff --git a/keyboards/abacus/config.h b/keyboards/abacus/config.h index 85595a06795c..2e28b792a1d7 100644 --- a/keyboards/abacus/config.h +++ b/keyboards/abacus/config.h @@ -33,9 +33,6 @@ along with this program. If not, see . #define DIP_SWITCH_PINS { D0 } -#define ENCODERS_PAD_A { F1 } -#define ENCODERS_PAD_B { F0 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define RGB_DI_PIN D1 diff --git a/keyboards/abacus/info.json b/keyboards/abacus/info.json index 17cd35aba8b5..132187db265d 100644 --- a/keyboards/abacus/info.json +++ b/keyboards/abacus/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F1", "pin_b": "F0"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/abstract/ellipse/rev1/config.h b/keyboards/abstract/ellipse/rev1/config.h index 61a157c01e8b..6843cd06ff1f 100644 --- a/keyboards/abstract/ellipse/rev1/config.h +++ b/keyboards/abstract/ellipse/rev1/config.h @@ -67,7 +67,3 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -#define ENCODERS_PAD_A { B2, B3, D5 } -#define ENCODERS_PAD_B { B1, B7, B4 } -#define ENCODER_RESOLUTION 2 diff --git a/keyboards/abstract/ellipse/rev1/info.json b/keyboards/abstract/ellipse/rev1/info.json index 664cae1902d7..4f28bc84aa22 100644 --- a/keyboards/abstract/ellipse/rev1/info.json +++ b/keyboards/abstract/ellipse/rev1/info.json @@ -8,6 +8,13 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B1", "resolution": 2}, + {"pin_a": "B3", "pin_b": "B7", "resolution": 2}, + {"pin_a": "D5", "pin_b": "B4", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/acheron/shark/alpha/config.h b/keyboards/acheron/shark/alpha/config.h index cadd2d825d6c..ee2e848b16dd 100644 --- a/keyboards/acheron/shark/alpha/config.h +++ b/keyboards/acheron/shark/alpha/config.h @@ -17,11 +17,6 @@ along with this program. If not, see . #pragma once - -/* encoder pads */ -#define ENCODERS_PAD_A { B6 } -#define ENCODERS_PAD_B { B7 } - /* * Keyboard Matrix Assignments * diff --git a/keyboards/acheron/shark/alpha/info.json b/keyboards/acheron/shark/alpha/info.json index 0db6134e0bc2..59bd58772478 100644 --- a/keyboards/acheron/shark/alpha/info.json +++ b/keyboards/acheron/shark/alpha/info.json @@ -6,6 +6,11 @@ "pid": "0x5368", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B7"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "board": "QMK_PROTON_C", diff --git a/keyboards/acheron/shark/beta/config.h b/keyboards/acheron/shark/beta/config.h index 633f76289ffa..3d5f18da4e29 100644 --- a/keyboards/acheron/shark/beta/config.h +++ b/keyboards/acheron/shark/beta/config.h @@ -52,7 +52,4 @@ along with this program. If not, see . #define WS2812_DMA_STREAM STM32_DMA2_STREAM5 #define WS2812_DMA_CHANNEL 6 -#define ENCODERS_PAD_A { C15 } -#define ENCODERS_PAD_B { C14 } - #define EEPROM_I2C_24LC256 diff --git a/keyboards/acheron/shark/beta/info.json b/keyboards/acheron/shark/beta/info.json index 615e9a91b993..94f5f6205eb0 100644 --- a/keyboards/acheron/shark/beta/info.json +++ b/keyboards/acheron/shark/beta/info.json @@ -4,6 +4,11 @@ "pid": "0x5369", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "C15", "pin_b": "C14"} + ] + }, "processor": "STM32F411", "bootloader": "stm32-dfu", "community_layouts": ["ortho_4x12"], diff --git a/keyboards/adafruit/macropad/config.h b/keyboards/adafruit/macropad/config.h index 6f2c08c5e8e8..c493c487e385 100644 --- a/keyboards/adafruit/macropad/config.h +++ b/keyboards/adafruit/macropad/config.h @@ -37,10 +37,6 @@ #define SPI_MOSI_PIN GP27 #define SPI_MISO_PIN GP28 -/* Encoders */ -#define ENCODERS_PAD_A { GP18 } -#define ENCODERS_PAD_B { GP17 } - /* Double tap the side button to enter bootloader */ #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP13 diff --git a/keyboards/adafruit/macropad/info.json b/keyboards/adafruit/macropad/info.json index 4986a5974f21..75c859adb12d 100644 --- a/keyboards/adafruit/macropad/info.json +++ b/keyboards/adafruit/macropad/info.json @@ -8,6 +8,11 @@ "pid": "0x0108", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "GP18", "pin_b": "GP17"} + ] + }, "bootmagic": { "matrix": [1, 2] }, diff --git a/keyboards/adpenrose/akemipad/config.h b/keyboards/adpenrose/akemipad/config.h index f5f58ebeccd2..47fcf429ac87 100644 --- a/keyboards/adpenrose/akemipad/config.h +++ b/keyboards/adpenrose/akemipad/config.h @@ -20,8 +20,6 @@ /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B3 } #define TAP_CODE_DELAY 10 /* Audio functionality */ diff --git a/keyboards/adpenrose/akemipad/info.json b/keyboards/adpenrose/akemipad/info.json index 2e3f7851643e..9b5a8d6ef6ad 100644 --- a/keyboards/adpenrose/akemipad/info.json +++ b/keyboards/adpenrose/akemipad/info.json @@ -7,6 +7,11 @@ "pid": "0x0004", "vid": "0x4450" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B3"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/adpenrose/kintsugi/config.h b/keyboards/adpenrose/kintsugi/config.h index 0c1ab9100e34..5ffeb868374c 100644 --- a/keyboards/adpenrose/kintsugi/config.h +++ b/keyboards/adpenrose/kintsugi/config.h @@ -34,8 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B7 } -#define ENCODERS_PAD_B { D5 } #define TAP_CODE_DELAY 10 /* Underglow options: */ diff --git a/keyboards/adpenrose/kintsugi/info.json b/keyboards/adpenrose/kintsugi/info.json index 8c6258f020ab..a26c65b42a86 100644 --- a/keyboards/adpenrose/kintsugi/info.json +++ b/keyboards/adpenrose/kintsugi/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B7", "pin_b": "D5"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/adpenrose/obi/config.h b/keyboards/adpenrose/obi/config.h index 10936dd9dcce..c9f606999e19 100644 --- a/keyboards/adpenrose/obi/config.h +++ b/keyboards/adpenrose/obi/config.h @@ -20,8 +20,6 @@ /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { F1 } -#define ENCODERS_PAD_B { F0 } #define TAP_CODE_DELAY 10 /* Underglow options: */ diff --git a/keyboards/adpenrose/obi/info.json b/keyboards/adpenrose/obi/info.json index 544b4fc5d4ad..c0c1b73c6448 100644 --- a/keyboards/adpenrose/obi/info.json +++ b/keyboards/adpenrose/obi/info.json @@ -7,6 +7,11 @@ "pid": "0x0002", "vid": "0x4450" }, + "encoder": { + "rotary": [ + {"pin_a": "F1", "pin_b": "F0"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/aidansmithdotdev/fine40/config.h b/keyboards/aidansmithdotdev/fine40/config.h index e7799e2b0be6..a39d7fef7d72 100644 --- a/keyboards/aidansmithdotdev/fine40/config.h +++ b/keyboards/aidansmithdotdev/fine40/config.h @@ -3,9 +3,4 @@ #pragma once - -#define ENCODER_RESOLUTION 2 -#define ENCODERS_PAD_A { D5 } -#define ENCODERS_PAD_B { B7 } - #define OLED_DISPLAY_128X64 //Comment this out to change the screen size diff --git a/keyboards/aidansmithdotdev/fine40/info.json b/keyboards/aidansmithdotdev/fine40/info.json index c2e1afd84cab..c41557a9204a 100644 --- a/keyboards/aidansmithdotdev/fine40/info.json +++ b/keyboards/aidansmithdotdev/fine40/info.json @@ -25,6 +25,11 @@ "pid": "0x4564", "vid": "0xA059" }, + "encoder": { + "rotary": [ + {"pin_a": "D5", "pin_b": "B7", "resolution": 2} + ] + }, "layouts": { "LAYOUT_2u_single_space": { "layout": [ diff --git a/keyboards/aleblazer/zodiark/config.h b/keyboards/aleblazer/zodiark/config.h index 2028f9bda3e6..148e9a767200 100644 --- a/keyboards/aleblazer/zodiark/config.h +++ b/keyboards/aleblazer/zodiark/config.h @@ -20,12 +20,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D4 } -#define ENCODERS_PAD_A_RIGHT { D4 } -#define ENCODERS_PAD_B_RIGHT { D2 } -#define ENCODER_RESOLUTION 3 - /* key matrix pins */ #define MATRIX_ROW_PINS { C6, D7, E6, B4, F4 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } diff --git a/keyboards/aleblazer/zodiark/info.json b/keyboards/aleblazer/zodiark/info.json index f8d2300fd944..821111762574 100644 --- a/keyboards/aleblazer/zodiark/info.json +++ b/keyboards/aleblazer/zodiark/info.json @@ -8,8 +8,20 @@ "pid": "0xF902", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D4", "resolution": 3} + ] + }, "split": { - "soft_serial_pin": "D3" + "soft_serial_pin": "D3", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "D4", "pin_b": "D2", "resolution": 3} + ] + } + }, }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/ano/config.h b/keyboards/ano/config.h index be3a49fe3378..df6d076d5c04 100644 --- a/keyboards/ano/config.h +++ b/keyboards/ano/config.h @@ -19,11 +19,6 @@ #define MATRIX_ROW_PINS { A4, B14, B15, B9, B10, B11 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6, B7, A5, A6, A7, A8, A15, A2, A1, A0, B8, B13 } - -#define ENCODERS_PAD_A { B12 } -#define ENCODERS_PAD_B { A14 } -#define ENCODER_RESOLUTION 2 - #define DIODE_DIRECTION COL2ROW #define TAP_CODE_DELAY 10 diff --git a/keyboards/ano/info.json b/keyboards/ano/info.json index 94e1f828cc46..19d53a9ce10a 100644 --- a/keyboards/ano/info.json +++ b/keyboards/ano/info.json @@ -8,6 +8,11 @@ "pid": "0x0651", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B12", "pin_b": "A14", "resolution": 2} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/aplyard/aplx6/rev2/config.h b/keyboards/aplyard/aplx6/rev2/config.h index fdfa5a6809c2..f2793935cbcb 100644 --- a/keyboards/aplyard/aplx6/rev2/config.h +++ b/keyboards/aplyard/aplx6/rev2/config.h @@ -27,8 +27,4 @@ along with this program. If not, see . #define TAPPING_TERM 200 -/* Encoder */ -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } - #define TAP_CODE_DELAY 50 diff --git a/keyboards/aplyard/aplx6/rev2/info.json b/keyboards/aplyard/aplx6/rev2/info.json index 314d52dc8dea..114894a71449 100644 --- a/keyboards/aplyard/aplx6/rev2/info.json +++ b/keyboards/aplyard/aplx6/rev2/info.json @@ -3,6 +3,11 @@ "pid": "0x0040", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina" } diff --git a/keyboards/arrayperipherals/1x4p1/config.h b/keyboards/arrayperipherals/1x4p1/config.h deleted file mode 100644 index b70680e4f53d..000000000000 --- a/keyboards/arrayperipherals/1x4p1/config.h +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2020 David Doan - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -/* rotary encoder*/ -#define ENCODERS_PAD_A {F0} -#define ENCODERS_PAD_B {F1} diff --git a/keyboards/arrayperipherals/1x4p1/info.json b/keyboards/arrayperipherals/1x4p1/info.json index b124b203349b..2cc838bc929b 100644 --- a/keyboards/arrayperipherals/1x4p1/info.json +++ b/keyboards/arrayperipherals/1x4p1/info.json @@ -8,6 +8,11 @@ "pid": "0x4F46", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F0", "pin_b": "F1"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/atlantis/ak81_ve/config.h b/keyboards/atlantis/ak81_ve/config.h index 0f3442b136d0..d5bf49a34fed 100644 --- a/keyboards/atlantis/ak81_ve/config.h +++ b/keyboards/atlantis/ak81_ve/config.h @@ -21,9 +21,6 @@ #define MATRIX_ROW_PINS { F1, F7, F6, F5, F4, D5 } #define MATRIX_COL_PINS { F0, C7, C6, B6, B5, B4, D7, D6, B2, B7, D3, D2, D1, D0, B3 } -/* Encoder pins */ -#define ENCODERS_PAD_A { E6 } -#define ENCODERS_PAD_B { B0 } #define ENCODERS 1 #define ENCODERS_CCW_KEY { { 4, 5 } } // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 3, 5 } } // Note: array is { col, row ) diff --git a/keyboards/atlantis/ak81_ve/info.json b/keyboards/atlantis/ak81_ve/info.json index 052492b7ce1b..0269bd1e279d 100644 --- a/keyboards/atlantis/ak81_ve/info.json +++ b/keyboards/atlantis/ak81_ve/info.json @@ -7,6 +7,11 @@ "pid": "0x0081", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E6", "pin_b": "B0"} + ] + }, "indicators": { "caps_lock": "D4", "on_state": 0 diff --git a/keyboards/atreyu/rev1/config.h b/keyboards/atreyu/rev1/config.h index 38c73ec7e08f..99eb2c21e60c 100644 --- a/keyboards/atreyu/rev1/config.h +++ b/keyboards/atreyu/rev1/config.h @@ -30,12 +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 } - /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreyu/rev1/info.json b/keyboards/atreyu/rev1/info.json index a9522acd5dc7..6d191d063562 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 75b4691cf217..de63cf3bd1b5 100644 --- a/keyboards/atreyu/rev2/config.h +++ b/keyboards/atreyu/rev2/config.h @@ -30,10 +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 } - /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreyu/rev2/info.json b/keyboards/atreyu/rev2/info.json index 5c74a40c92cf..a890b8d27164 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": { diff --git a/keyboards/avalanche/v2/config.h b/keyboards/avalanche/v2/config.h index 5aee77c04d66..3978f581e1c7 100644 --- a/keyboards/avalanche/v2/config.h +++ b/keyboards/avalanche/v2/config.h @@ -13,7 +13,3 @@ #define RGBLED_NUM 12 #define RGBLED_SPLIT { 6, 6 } #define RGBLIGHT_SPLIT - -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { F4 } -#define ENCODER_RESOLUTION 2 diff --git a/keyboards/avalanche/v2/info.json b/keyboards/avalanche/v2/info.json index d6b770ee4895..7105fc17874a 100644 --- a/keyboards/avalanche/v2/info.json +++ b/keyboards/avalanche/v2/info.json @@ -8,6 +8,11 @@ "pid": "0x0002", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "F4", "resolution": 2} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/avalanche/v3/config.h b/keyboards/avalanche/v3/config.h index a0e5af4531f2..efe0c2793240 100644 --- a/keyboards/avalanche/v3/config.h +++ b/keyboards/avalanche/v3/config.h @@ -13,7 +13,3 @@ #define RGBLED_NUM 12 #define RGBLED_SPLIT { 7, 7 } #define RGBLIGHT_SPLIT - -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { F4 } -#define ENCODER_RESOLUTION 2 diff --git a/keyboards/avalanche/v3/info.json b/keyboards/avalanche/v3/info.json index 3a0b43fb7123..70ffcc9efc32 100644 --- a/keyboards/avalanche/v3/info.json +++ b/keyboards/avalanche/v3/info.json @@ -8,6 +8,11 @@ "pid": "0x0003", "device_version": "0.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "F4", "resolution": 2} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/avalanche/v4/config.h b/keyboards/avalanche/v4/config.h index 1009ab6e3314..86dff022e06f 100644 --- a/keyboards/avalanche/v4/config.h +++ b/keyboards/avalanche/v4/config.h @@ -8,10 +8,6 @@ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { F4 } -#define ENCODER_RESOLUTION 2 - #ifdef RGBLIGHT_ENABLE # define RGB_DI_PIN D3 # define RGBLED_NUM 64 diff --git a/keyboards/avalanche/v4/info.json b/keyboards/avalanche/v4/info.json index fdb71ce0e898..5b31b5ca111d 100644 --- a/keyboards/avalanche/v4/info.json +++ b/keyboards/avalanche/v4/info.json @@ -8,6 +8,11 @@ "pid": "0x0004", "device_version": "0.0.4" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "F4", "resolution": 2} + ] + }, "split": { "soft_serial_pin": "D2" }, From fe124b88fc8378c5b41883eed4307ce68740cdb0 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:31:05 +1100 Subject: [PATCH 04/31] Move encoder config to info.json, B --- keyboards/bandominedoni/config.h | 13 +------------ keyboards/bandominedoni/info.json | 9 ++++++++- keyboards/basekeys/trifecta/config.h | 4 ---- keyboards/basekeys/trifecta/info.json | 7 +++++++ keyboards/basketweave/config.h | 3 --- keyboards/basketweave/info.json | 5 +++++ keyboards/bbrfkr/dynamis/config.h | 4 ---- keyboards/bbrfkr/dynamis/info.json | 5 +++++ keyboards/bluebell/swoop/config.h | 6 ------ keyboards/bluebell/swoop/info.json | 14 +++++++++++++- keyboards/bobpad/config.h | 3 --- keyboards/bobpad/info.json | 5 +++++ keyboards/bolsa/damapad/config.h | 4 ---- keyboards/bolsa/damapad/info.json | 5 +++++ keyboards/boston/config.h | 6 ------ keyboards/boston/info.json | 5 +++++ keyboards/boston_meetup/2019/config.h | 3 --- keyboards/boston_meetup/2019/info.json | 5 +++++ 18 files changed, 59 insertions(+), 47 deletions(-) diff --git a/keyboards/bandominedoni/config.h b/keyboards/bandominedoni/config.h index 947f60b0f639..7a25216afdd9 100644 --- a/keyboards/bandominedoni/config.h +++ b/keyboards/bandominedoni/config.h @@ -157,15 +157,4 @@ # define MIDI_INITIAL_VELOCITY 117 #endif // MIDI_ENABLE -/* - * Encoder options - */ -#ifdef ENCODER_ENABLE -# define ENCODERS_PAD_A { } -# define ENCODERS_PAD_B { } -# define ENCODER_RESOLUTIONS { } -# define ENCODERS_PAD_A_RIGHT { F5 } -# define ENCODERS_PAD_B_RIGHT { F4 } -# define ENCODER_RESOLUTIONS_RIGHT { 4 } -# define TAP_CODE_DELAY 10 -#endif // ENCODER_ENABLE +#define TAP_CODE_DELAY 10 diff --git a/keyboards/bandominedoni/info.json b/keyboards/bandominedoni/info.json index 79961fa770df..d0d470a4e47f 100644 --- a/keyboards/bandominedoni/info.json +++ b/keyboards/bandominedoni/info.json @@ -9,7 +9,14 @@ "device_version": "0.0.1" }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/basekeys/trifecta/config.h b/keyboards/basekeys/trifecta/config.h index e21dcdd3fe73..c06395545d51 100644 --- a/keyboards/basekeys/trifecta/config.h +++ b/keyboards/basekeys/trifecta/config.h @@ -22,10 +22,6 @@ #define MATRIX_ROW_PINS { B0, B7, F7, B1, B6, C6, C7, B5, F6, D2 } #define MATRIX_COL_PINS { F0, F1, F4, F5, D1, B2, D0, B3 } - -#define ENCODERS_PAD_A { D4, D6, D7 } -#define ENCODERS_PAD_B { B4, D3, D5 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/basekeys/trifecta/info.json b/keyboards/basekeys/trifecta/info.json index 6d7cf723a828..8743e3aad1fe 100644 --- a/keyboards/basekeys/trifecta/info.json +++ b/keyboards/basekeys/trifecta/info.json @@ -8,6 +8,13 @@ "pid": "0xEAF3", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "B4"}, + {"pin_a": "D6", "pin_b": "D3"}, + {"pin_a": "D7", "pin_b": "D5"} + ] + }, "bootmagic": { "matrix": [1, 0] }, diff --git a/keyboards/basketweave/config.h b/keyboards/basketweave/config.h index b25383729e69..2c3f6f97f247 100644 --- a/keyboards/basketweave/config.h +++ b/keyboards/basketweave/config.h @@ -30,7 +30,4 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS_PAD_A { D7 } -#define ENCODERS_PAD_B { C0 } - #define TAP_CODE_DELAY 10 diff --git a/keyboards/basketweave/info.json b/keyboards/basketweave/info.json index d976a2811cd9..3ef505854e88 100644 --- a/keyboards/basketweave/info.json +++ b/keyboards/basketweave/info.json @@ -8,6 +8,11 @@ "pid": "0x8989", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D7", "pin_b": "C0"} + ] + }, "processor": "atmega32a", "bootloader": "usbasploader", "layouts": { diff --git a/keyboards/bbrfkr/dynamis/config.h b/keyboards/bbrfkr/dynamis/config.h index 516f749ff6b0..28c21cb9f551 100644 --- a/keyboards/bbrfkr/dynamis/config.h +++ b/keyboards/bbrfkr/dynamis/config.h @@ -37,9 +37,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* rotary encoder */ -#define ENCODERS_PAD_A { B7 } -#define ENCODERS_PAD_B { E6 } - #define PMW33XX_CS_PIN SPI_SS_PIN #define POINTING_DEVICE_INVERT_Y diff --git a/keyboards/bbrfkr/dynamis/info.json b/keyboards/bbrfkr/dynamis/info.json index 5574bf6da4fc..4f256e8ac574 100644 --- a/keyboards/bbrfkr/dynamis/info.json +++ b/keyboards/bbrfkr/dynamis/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B7", "pin_b": "E6"} + ] + }, "processor": "atmega32u4", "bootloader": "qmk-dfu", "layouts": { diff --git a/keyboards/bluebell/swoop/config.h b/keyboards/bluebell/swoop/config.h index ece3ed5928f8..de47d3a071d9 100644 --- a/keyboards/bluebell/swoop/config.h +++ b/keyboards/bluebell/swoop/config.h @@ -22,12 +22,6 @@ #define EE_HANDS -// encoders -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } -#define ENCODERS_PAD_A_RIGHT { B5 } -#define ENCODERS_PAD_B_RIGHT { B4 } - // OLED driver #ifdef OLED_DRIVER_ENABLE #define OLED_DISPLAY_128X32 diff --git a/keyboards/bluebell/swoop/info.json b/keyboards/bluebell/swoop/info.json index 320590894bef..49dcc857e939 100644 --- a/keyboards/bluebell/swoop/info.json +++ b/keyboards/bluebell/swoop/info.json @@ -8,8 +8,20 @@ "pid": "0x3046", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B4"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/bobpad/config.h b/keyboards/bobpad/config.h index 587a0a0d5ded..1b4ca326d9f4 100644 --- a/keyboards/bobpad/config.h +++ b/keyboards/bobpad/config.h @@ -31,6 +31,3 @@ #define MATRIX_COL_PINS { F6, F5, F4 } #define DIODE_DIRECTION COL2ROW - -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B2 } \ No newline at end of file diff --git a/keyboards/bobpad/info.json b/keyboards/bobpad/info.json index 58f724fbbef6..43e614dbad5d 100644 --- a/keyboards/bobpad/info.json +++ b/keyboards/bobpad/info.json @@ -8,6 +8,11 @@ "pid": "0x0002", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2"} + ] + }, "indicators": { "caps_lock": "D0", "num_lock": "D4", diff --git a/keyboards/bolsa/damapad/config.h b/keyboards/bolsa/damapad/config.h index 444f0de0e7d6..9342bd028398 100644 --- a/keyboards/bolsa/damapad/config.h +++ b/keyboards/bolsa/damapad/config.h @@ -26,10 +26,6 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B3 } -#define ENCODER_RESOLUTION 2 - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/bolsa/damapad/info.json b/keyboards/bolsa/damapad/info.json index 3db2ab2e111a..72e432c87172 100644 --- a/keyboards/bolsa/damapad/info.json +++ b/keyboards/bolsa/damapad/info.json @@ -8,6 +8,11 @@ "pid": "0x6470", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/boston/config.h b/keyboards/boston/config.h index 7b3249e8810e..1d9c207a78a3 100644 --- a/keyboards/boston/config.h +++ b/keyboards/boston/config.h @@ -52,12 +52,6 @@ //The 3D-printed version of Boston uses APA106 LEDs, which are reversed #define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB -/* Define encoder */ -#define ENCODERS_PAD_A \ - { C13 } -#define ENCODERS_PAD_B \ - { F1 } -#define ENCODER_RESOLUTION 2 #define TAP_CODE_DELAY 15 /* diff --git a/keyboards/boston/info.json b/keyboards/boston/info.json index 87980602ba30..de6fc4a80a48 100644 --- a/keyboards/boston/info.json +++ b/keyboards/boston/info.json @@ -8,6 +8,11 @@ "pid": "0x4176", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C13", "pin_b": "F1", "resolution": 2} + ] + }, "indicators": { "caps_lock": "A1", "num_lock": "A0", diff --git a/keyboards/boston_meetup/2019/config.h b/keyboards/boston_meetup/2019/config.h index 624d8fd1d057..00e8648df869 100644 --- a/keyboards/boston_meetup/2019/config.h +++ b/keyboards/boston_meetup/2019/config.h @@ -17,9 +17,6 @@ #define MATRIX_ROW_PINS { A3, B8, B9, B1 } #define MATRIX_COL_PINS { A7, A8, B2, B10 } -#define ENCODERS_PAD_A { B13 } -#define ENCODERS_PAD_B { B14 } - //Audio #undef AUDIO_VOICES #undef AUDIO_PIN diff --git a/keyboards/boston_meetup/2019/info.json b/keyboards/boston_meetup/2019/info.json index 5ce237506258..22f54c3472ee 100644 --- a/keyboards/boston_meetup/2019/info.json +++ b/keyboards/boston_meetup/2019/info.json @@ -2,6 +2,11 @@ "usb": { "device_version": "20.1.9" }, + "encoder": { + "rotary": [ + {"pin_a": "B13", "pin_b": "B14"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "board": "QMK_PROTON_C", From e1614908e5e162c389e730c3861db1e4bf0d6aba Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:31:18 +1100 Subject: [PATCH 05/31] Move encoder config to info.json, C --- keyboards/cannonkeys/balance/config.h | 4 ---- keyboards/cannonkeys/balance/info.json | 5 +++++ keyboards/cannonkeys/ortho75/config.h | 3 --- keyboards/cannonkeys/ortho75/info.json | 5 +++++ keyboards/cannonkeys/satisfaction75/config.h | 5 ----- keyboards/cannonkeys/satisfaction75/info.json | 5 +++++ keyboards/capsunlocked/cu7/config.h | 6 ------ keyboards/capsunlocked/cu7/info.json | 5 +++++ keyboards/checkerboards/phoenix45_ortho/config.h | 4 ---- keyboards/checkerboards/phoenix45_ortho/info.json | 5 +++++ keyboards/checkerboards/quark/config.h | 4 ---- keyboards/checkerboards/quark/info.json | 5 +++++ keyboards/checkerboards/quark_plus/config.h | 3 --- keyboards/checkerboards/quark_plus/info.json | 8 ++++++++ keyboards/checkerboards/quark_squared/config.h | 4 ---- keyboards/checkerboards/quark_squared/info.json | 5 +++++ keyboards/checkerboards/snop60/config.h | 3 --- keyboards/checkerboards/snop60/info.json | 5 +++++ keyboards/cherrybstudio/cb65/config.h | 4 ---- keyboards/chocofly/v1/config.h | 4 ---- keyboards/chocofly/v1/info.json | 5 +++++ keyboards/ck60i/config.h | 3 --- keyboards/ck60i/info.json | 5 +++++ keyboards/ckeys/thedora/config.h | 4 ---- keyboards/ckeys/thedora/info.json | 5 +++++ keyboards/ckeys/washington/config.h | 3 --- keyboards/ckeys/washington/info.json | 5 +++++ keyboards/clickety_split/leeloo/info.json | 14 +++++++++++++- keyboards/clickety_split/leeloo/rev1/config.h | 6 ------ keyboards/clueboard/2x1800/2019/config.h | 7 ------- keyboards/clueboard/2x1800/2019/info.json | 8 ++++++++ keyboards/clueboard/2x1800/2021/config.h | 6 ------ keyboards/clueboard/2x1800/2021/info.json | 6 ++++++ keyboards/crbn/config.h | 7 ------- keyboards/crbn/info.json | 5 +++++ keyboards/custommk/evo70/config.h | 3 --- keyboards/custommk/evo70/info.json | 5 +++++ keyboards/custommk/genesis/rev1/config.h | 3 --- keyboards/custommk/genesis/rev1/info.json | 6 ++++++ keyboards/custommk/genesis/rev2/config.h | 3 --- keyboards/custommk/genesis/rev2/info.json | 6 ++++++ 41 files changed, 117 insertions(+), 90 deletions(-) diff --git a/keyboards/cannonkeys/balance/config.h b/keyboards/cannonkeys/balance/config.h index 5ba99322ff40..5d93b09a273a 100644 --- a/keyboards/cannonkeys/balance/config.h +++ b/keyboards/cannonkeys/balance/config.h @@ -26,10 +26,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { B6 } - -#define ENCODER_RESOLUTION 2 #define TAP_CODE_DELAY 25 #define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/cannonkeys/balance/info.json b/keyboards/cannonkeys/balance/info.json index 13eb96a62fbe..b9844e52950f 100644 --- a/keyboards/cannonkeys/balance/info.json +++ b/keyboards/cannonkeys/balance/info.json @@ -8,6 +8,11 @@ "pid": "0xBA77", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B6", "resolution": 2} + ] + }, "indicators": { "caps_lock": "B12", "num_lock": "B14", diff --git a/keyboards/cannonkeys/ortho75/config.h b/keyboards/cannonkeys/ortho75/config.h index a69a445b1593..a3dd56d1f105 100644 --- a/keyboards/cannonkeys/ortho75/config.h +++ b/keyboards/cannonkeys/ortho75/config.h @@ -27,9 +27,6 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 6 #define BACKLIGHT_BREATHING -#define ENCODERS_PAD_A { B9 } -#define ENCODERS_PAD_B { B8 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/cannonkeys/ortho75/info.json b/keyboards/cannonkeys/ortho75/info.json index c529181e4f84..39f80205757c 100644 --- a/keyboards/cannonkeys/ortho75/info.json +++ b/keyboards/cannonkeys/ortho75/info.json @@ -8,6 +8,11 @@ "pid": "0x6464", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B9", "pin_b": "B8"} + ] + }, "processor": "STM32F103", "bootloader": "stm32duino", "community_layouts": ["ortho_5x15"], diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index 55dd8386dce0..424fabb6dee0 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -27,11 +27,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B3, B4, A0, A2, A4, A3 } #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B9 } -#define ENCODERS_PAD_B { B8 } - -#define ENCODER_RESOLUTION 2 - //LEDS A6, RGB B15 #define BACKLIGHT_LEVELS 24 #define BACKLIGHT_BREATHING diff --git a/keyboards/cannonkeys/satisfaction75/info.json b/keyboards/cannonkeys/satisfaction75/info.json index 44c96b3f3ed8..d65ecc3cdf4e 100644 --- a/keyboards/cannonkeys/satisfaction75/info.json +++ b/keyboards/cannonkeys/satisfaction75/info.json @@ -8,6 +8,11 @@ "pid": "0x57F5", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B9", "pin_b": "B8", "resolution": 2} + ] + }, "processor": "STM32F072", "bootloader": "stm32-dfu" } diff --git a/keyboards/capsunlocked/cu7/config.h b/keyboards/capsunlocked/cu7/config.h index 93db7814f256..cdc031b93b09 100644 --- a/keyboards/capsunlocked/cu7/config.h +++ b/keyboards/capsunlocked/cu7/config.h @@ -27,12 +27,6 @@ along with this program. If not, see . * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ - -#define ENCODER_RESOLUTION 2 - -#define ENCODERS_PAD_A { D6 } -#define ENCODERS_PAD_B { D4 } - #define MATRIX_ROW_PINS { D7, F0, F6 } #define MATRIX_COL_PINS { F5, F7, F4 } diff --git a/keyboards/capsunlocked/cu7/info.json b/keyboards/capsunlocked/cu7/info.json index 64416b026469..ebd7b6d491da 100644 --- a/keyboards/capsunlocked/cu7/info.json +++ b/keyboards/capsunlocked/cu7/info.json @@ -8,6 +8,11 @@ "pid": "0x0007", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D4", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/checkerboards/phoenix45_ortho/config.h b/keyboards/checkerboards/phoenix45_ortho/config.h index 668a09d9368d..8c11a3ccf741 100644 --- a/keyboards/checkerboards/phoenix45_ortho/config.h +++ b/keyboards/checkerboards/phoenix45_ortho/config.h @@ -29,7 +29,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* encoder pads */ -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B2 } diff --git a/keyboards/checkerboards/phoenix45_ortho/info.json b/keyboards/checkerboards/phoenix45_ortho/info.json index ed976903e8d7..23f6b024fa0b 100644 --- a/keyboards/checkerboards/phoenix45_ortho/info.json +++ b/keyboards/checkerboards/phoenix45_ortho/info.json @@ -8,6 +8,11 @@ "pid": "0x1849", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B2"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/checkerboards/quark/config.h b/keyboards/checkerboards/quark/config.h index d8c8f7be99f7..42ccb0630017 100644 --- a/keyboards/checkerboards/quark/config.h +++ b/keyboards/checkerboards/quark/config.h @@ -46,7 +46,3 @@ #define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue #define RGBLIGHT_SAT_STEP 12 // units to step when in/decresing saturation #define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) - -// rotary encoder parameters -#define ENCODERS_PAD_A { B0 } -#define ENCODERS_PAD_B { D1 } diff --git a/keyboards/checkerboards/quark/info.json b/keyboards/checkerboards/quark/info.json index f7016ac048bb..0f7f3b0f4403 100644 --- a/keyboards/checkerboards/quark/info.json +++ b/keyboards/checkerboards/quark/info.json @@ -8,6 +8,11 @@ "pid": "0x5340", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "D1"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "community_layouts": ["ortho_4x12", "planck_mit"], diff --git a/keyboards/checkerboards/quark_plus/config.h b/keyboards/checkerboards/quark_plus/config.h index fc1104eb5fda..70458bc159e2 100644 --- a/keyboards/checkerboards/quark_plus/config.h +++ b/keyboards/checkerboards/quark_plus/config.h @@ -51,6 +51,3 @@ #define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue #define RGBLIGHT_SAT_STEP 12 // units to step when in/decresing saturation #define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) - -#define ENCODERS_PAD_A { C7, B7, B3, B2} -#define ENCODERS_PAD_B { B7, C7, B2, B3} diff --git a/keyboards/checkerboards/quark_plus/info.json b/keyboards/checkerboards/quark_plus/info.json index 6685b8422417..6ce9a36ca909 100644 --- a/keyboards/checkerboards/quark_plus/info.json +++ b/keyboards/checkerboards/quark_plus/info.json @@ -8,6 +8,14 @@ "pid": "0x5344", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C7", "pin_b": "B7"}, + {"pin_a": "B7", "pin_b": "C7"}, + {"pin_a": "B3", "pin_b": "B2"}, + {"pin_a": "B2", "pin_b": "B3"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/checkerboards/quark_squared/config.h b/keyboards/checkerboards/quark_squared/config.h index 1715a1101b72..85bed28b4596 100644 --- a/keyboards/checkerboards/quark_squared/config.h +++ b/keyboards/checkerboards/quark_squared/config.h @@ -46,7 +46,3 @@ #define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue #define RGBLIGHT_SAT_STEP 12 // units to step when in/decresing saturation #define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) - -/* define rotary encoder pins */ -#define ENCODERS_PAD_A {B0} -#define ENCODERS_PAD_B {D1} diff --git a/keyboards/checkerboards/quark_squared/info.json b/keyboards/checkerboards/quark_squared/info.json index 699300a3a6eb..de8496a7981a 100644 --- a/keyboards/checkerboards/quark_squared/info.json +++ b/keyboards/checkerboards/quark_squared/info.json @@ -8,6 +8,11 @@ "pid": "0x5342", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "D1"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/checkerboards/snop60/config.h b/keyboards/checkerboards/snop60/config.h index d9b5194a0b36..e4bcbdb77fe3 100644 --- a/keyboards/checkerboards/snop60/config.h +++ b/keyboards/checkerboards/snop60/config.h @@ -52,6 +52,3 @@ Copyright 2022 Nathan Spears /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define ENCODERS_PAD_A {D2} -#define ENCODERS_PAD_B {D3} diff --git a/keyboards/checkerboards/snop60/info.json b/keyboards/checkerboards/snop60/info.json index 8866a2728e3d..8a3dc558eafa 100644 --- a/keyboards/checkerboards/snop60/info.json +++ b/keyboards/checkerboards/snop60/info.json @@ -8,6 +8,11 @@ "pid": "0x2416", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D3"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layout_aliases": { diff --git a/keyboards/cherrybstudio/cb65/config.h b/keyboards/cherrybstudio/cb65/config.h index 85aec06c440c..b298fec8dc55 100644 --- a/keyboards/cherrybstudio/cb65/config.h +++ b/keyboards/cherrybstudio/cb65/config.h @@ -28,10 +28,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3 } #define MATRIX_COL_PINS { D5, D4, D6, D7, F7, B5, B6, C6 } -/* Encoder configuration */ -//#define ENCODERS_PAD_A { F5 } -//#define ENCODERS_PAD_B { F6 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/chocofly/v1/config.h b/keyboards/chocofly/v1/config.h index aa7e280ce4ff..a1886ffafad7 100644 --- a/keyboards/chocofly/v1/config.h +++ b/keyboards/chocofly/v1/config.h @@ -7,7 +7,3 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } #define DIODE_DIRECTION COL2ROW - -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } -#define ENCODER_RESOLUTION 2 diff --git a/keyboards/chocofly/v1/info.json b/keyboards/chocofly/v1/info.json index f0b5f7b21dc0..ab4fde45e6ca 100644 --- a/keyboards/chocofly/v1/info.json +++ b/keyboards/chocofly/v1/info.json @@ -8,6 +8,11 @@ "pid": "0x1001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/ck60i/config.h b/keyboards/ck60i/config.h index f298022e3598..2b05b1d86767 100644 --- a/keyboards/ck60i/config.h +++ b/keyboards/ck60i/config.h @@ -48,9 +48,6 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define ENCODERS_PAD_A { A5 } -#define ENCODERS_PAD_B { A4 } - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/ck60i/info.json b/keyboards/ck60i/info.json index 87b22f29ebbd..d1abf126ec0f 100644 --- a/keyboards/ck60i/info.json +++ b/keyboards/ck60i/info.json @@ -8,6 +8,11 @@ "pid": "0x6049", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A5", "pin_b": "A4"} + ] + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/ckeys/thedora/config.h b/keyboards/ckeys/thedora/config.h index 63f4397fccc9..5bcb91e82253 100755 --- a/keyboards/ckeys/thedora/config.h +++ b/keyboards/ckeys/thedora/config.h @@ -16,10 +16,6 @@ #pragma once - -#define ENCODERS_PAD_A { B13 } -#define ENCODERS_PAD_B { B15 } - #define MATRIX_ROW_PINS { A2, A1, A0, B8 } #define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0 } diff --git a/keyboards/ckeys/thedora/info.json b/keyboards/ckeys/thedora/info.json index 66b2e3784532..b72287fc2e6d 100644 --- a/keyboards/ckeys/thedora/info.json +++ b/keyboards/ckeys/thedora/info.json @@ -8,6 +8,11 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B13", "pin_b": "B15"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "board": "QMK_PROTON_C", diff --git a/keyboards/ckeys/washington/config.h b/keyboards/ckeys/washington/config.h index 0ee05a5dbff1..7792fca5b000 100644 --- a/keyboards/ckeys/washington/config.h +++ b/keyboards/ckeys/washington/config.h @@ -32,9 +32,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D4 } -#define ENCODERS_PAD_B { C6 } - #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING diff --git a/keyboards/ckeys/washington/info.json b/keyboards/ckeys/washington/info.json index 6c364dff1c27..7e34fb1e8074 100644 --- a/keyboards/ckeys/washington/info.json +++ b/keyboards/ckeys/washington/info.json @@ -8,6 +8,11 @@ "pid": "0x002A", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "C6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/clickety_split/leeloo/info.json b/keyboards/clickety_split/leeloo/info.json index fbed9fefa546..cdd9d713a6d2 100644 --- a/keyboards/clickety_split/leeloo/info.json +++ b/keyboards/clickety_split/leeloo/info.json @@ -8,8 +8,20 @@ "pid": "0x2022", "device_version": "0.1.3" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/clickety_split/leeloo/rev1/config.h b/keyboards/clickety_split/leeloo/rev1/config.h index 70ba6154ddf2..b309fa210b1f 100644 --- a/keyboards/clickety_split/leeloo/rev1/config.h +++ b/keyboards/clickety_split/leeloo/rev1/config.h @@ -26,12 +26,6 @@ /* define tapping term */ #define TAPPING_TERM 100 -/* encoder support */ -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } -#define ENCODERS_PAD_A_RIGHT { F4 } -#define ENCODERS_PAD_B_RIGHT { F5 } - /* disable action features */ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING diff --git a/keyboards/clueboard/2x1800/2019/config.h b/keyboards/clueboard/2x1800/2019/config.h index 73ae6ffde2d9..031952a0b39c 100644 --- a/keyboards/clueboard/2x1800/2019/config.h +++ b/keyboards/clueboard/2x1800/2019/config.h @@ -17,13 +17,6 @@ along with this program. If not, see . #pragma once - -/* - * Encoder Assignments - */ -#define ENCODERS_PAD_A { A5, A4, A2, A1 } -#define ENCODERS_PAD_B { A6, A7, A3, A0 } - /* audio support */ #define AUDIO_PIN_ALT B7 #define AUDIO_PIN C4 diff --git a/keyboards/clueboard/2x1800/2019/info.json b/keyboards/clueboard/2x1800/2019/info.json index 37a3146ee34a..0eebbabb6d60 100644 --- a/keyboards/clueboard/2x1800/2019/info.json +++ b/keyboards/clueboard/2x1800/2019/info.json @@ -27,6 +27,14 @@ "pid": "0x23A0", "vid": "0xC1ED" }, + "encoder": { + "rotary": [ + {"pin_a": "A5", "pin_b": "A6"}, + {"pin_a": "A4", "pin_b": "A7"}, + {"pin_a": "A2", "pin_b": "A3"}, + {"pin_a": "A1", "pin_b": "A0"} + ] + }, "layout_aliases": { "LAYOUT": "LAYOUT_all" }, diff --git a/keyboards/clueboard/2x1800/2021/config.h b/keyboards/clueboard/2x1800/2021/config.h index ef9f9e802761..eb4fd4bbf689 100644 --- a/keyboards/clueboard/2x1800/2021/config.h +++ b/keyboards/clueboard/2x1800/2021/config.h @@ -23,12 +23,6 @@ along with this program. If not, see . #define AUDIO_PIN C4 #define AUDIO_CLICKY -/* - * Encoder Assignments - */ -#define ENCODERS_PAD_A { D0, C5 } -#define ENCODERS_PAD_B { D1, C6 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/clueboard/2x1800/2021/info.json b/keyboards/clueboard/2x1800/2021/info.json index 10b681f60ccc..44842c0e168a 100644 --- a/keyboards/clueboard/2x1800/2021/info.json +++ b/keyboards/clueboard/2x1800/2021/info.json @@ -26,6 +26,12 @@ "usb": { "pid": "0x23A0" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"}, + {"pin_a": "C5", "pin_b": "C6"} + ] + }, "layout_aliases": { "LAYOUT": "LAYOUT_all" }, diff --git a/keyboards/crbn/config.h b/keyboards/crbn/config.h index d33e3e1f788f..840d8e7ca585 100644 --- a/keyboards/crbn/config.h +++ b/keyboards/crbn/config.h @@ -24,13 +24,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/*Rotary Encoder Pins*/ -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } - -/*Sets the number of pulses per increment*/ -#define ENCODER_RESOLUTION 2 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/crbn/info.json b/keyboards/crbn/info.json index eae6ee7415b0..20d5ad2ff40c 100644 --- a/keyboards/crbn/info.json +++ b/keyboards/crbn/info.json @@ -8,6 +8,11 @@ "pid": "0x0002", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "community_layouts": [ "ortho_4x12", "planck_mit" ], diff --git a/keyboards/custommk/evo70/config.h b/keyboards/custommk/evo70/config.h index 9f27a458b74b..d80ceba33d16 100644 --- a/keyboards/custommk/evo70/config.h +++ b/keyboards/custommk/evo70/config.h @@ -25,9 +25,6 @@ #define OLED_DISABLE_TIMEOUT -#define ENCODERS_PAD_A { C7 } -#define ENCODERS_PAD_B { D5 } -#define ENCODER_RESOLUTION 2 #define TAP_CODE_DELAY 10 #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/custommk/evo70/info.json b/keyboards/custommk/evo70/info.json index e5d232751862..fd8d8b631f45 100644 --- a/keyboards/custommk/evo70/info.json +++ b/keyboards/custommk/evo70/info.json @@ -9,6 +9,11 @@ "pid": "0xFAB5", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C7", "pin_b": "D5", "resolution": 2} + ] + }, "backlight": { "on_state": 0 }, diff --git a/keyboards/custommk/genesis/rev1/config.h b/keyboards/custommk/genesis/rev1/config.h index 5f6113bc68d0..c5e7661c65bc 100644 --- a/keyboards/custommk/genesis/rev1/config.h +++ b/keyboards/custommk/genesis/rev1/config.h @@ -24,9 +24,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { F6, D2 } -#define ENCODERS_PAD_B { F7, D1 } -#define ENCODER_RESOLUTION 2 #define TAP_CODE_DELAY 10 #define RGB_DI_PIN E6 diff --git a/keyboards/custommk/genesis/rev1/info.json b/keyboards/custommk/genesis/rev1/info.json index 3ff1d77904f3..aaab705432ed 100644 --- a/keyboards/custommk/genesis/rev1/info.json +++ b/keyboards/custommk/genesis/rev1/info.json @@ -8,6 +8,12 @@ "pid": "0xFAB0", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F7", "resolution": 2}, + {"pin_a": "D2", "pin_b": "D1", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "qmk-dfu", "layouts": { diff --git a/keyboards/custommk/genesis/rev2/config.h b/keyboards/custommk/genesis/rev2/config.h index f034eab5790d..f152f723febe 100644 --- a/keyboards/custommk/genesis/rev2/config.h +++ b/keyboards/custommk/genesis/rev2/config.h @@ -24,9 +24,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { F6, D2 } -#define ENCODERS_PAD_B { F7, D1 } -#define ENCODER_RESOLUTION 2 #define TAP_CODE_DELAY 10 #define RGB_DI_PIN E6 diff --git a/keyboards/custommk/genesis/rev2/info.json b/keyboards/custommk/genesis/rev2/info.json index 6ba57648cb18..45b83c512ab7 100644 --- a/keyboards/custommk/genesis/rev2/info.json +++ b/keyboards/custommk/genesis/rev2/info.json @@ -8,6 +8,12 @@ "pid": "0xFAB1", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F7", "resolution": 2}, + {"pin_a": "D2", "pin_b": "D1", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "qmk-dfu", "layouts": { From 02e94ee76d654068c15fb3d82bd3b564d172aea8 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:31:27 +1100 Subject: [PATCH 06/31] Move encoder config to info.json, D --- keyboards/dailycraft/owl8/config.h | 3 --- keyboards/dailycraft/owl8/info.json | 6 ++++++ keyboards/dailycraft/stickey4/config.h | 3 --- keyboards/dailycraft/stickey4/info.json | 6 ++++++ keyboards/delikeeb/vaguettelite/config.h | 4 ---- keyboards/delikeeb/vaguettelite/info.json | 6 ++++++ keyboards/delikeeb/vanana/rev1/config.h | 3 --- keyboards/delikeeb/vanana/rev1/info.json | 6 ++++++ keyboards/delikeeb/vanana/rev2/config.h | 3 --- keyboards/delikeeb/vanana/rev2/info.json | 6 ++++++ keyboards/delikeeb/waaffle/rev3/config.h | 4 ---- keyboards/delikeeb/waaffle/rev3/info.json | 6 ++++++ keyboards/dmqdesign/spin/config.h | 4 ---- keyboards/dmqdesign/spin/info.json | 7 +++++++ keyboards/doio/kb16/rev1/config.h | 4 ---- keyboards/doio/kb16/rev1/info.json | 7 +++++++ keyboards/doio/kb16/rev2/config.h | 4 ---- keyboards/doio/kb16/rev2/info.json | 7 +++++++ keyboards/doio/kb30/config.h | 6 ------ keyboards/doio/kb30/info.json | 7 +++++++ keyboards/doio/kb38/config.h | 5 ----- keyboards/doio/kb38/info.json | 7 +++++++ keyboards/doodboard/duckboard/config.h | 4 ---- keyboards/doodboard/duckboard/info.json | 5 +++++ keyboards/doodboard/duckboard_r2/config.h | 4 ---- keyboards/doodboard/duckboard_r2/info.json | 5 +++++ keyboards/draculad/config.h | 5 ----- keyboards/draculad/info.json | 16 +++++++++++++++- keyboards/draytronics/daisy/config.h | 2 -- keyboards/draytronics/daisy/info.json | 6 ++++++ keyboards/drhigsby/bkf/config.h | 4 ---- keyboards/drhigsby/bkf/info.json | 5 +++++ keyboards/drhigsby/packrat/config.h | 3 --- keyboards/drhigsby/packrat/info.json | 5 +++++ keyboards/dumbo/config.h | 5 ----- keyboards/dumbo/info.json | 16 +++++++++++++++- keyboards/dumbpad/v0x/config.h | 4 ---- keyboards/dumbpad/v0x/info.json | 5 +++++ keyboards/dumbpad/v0x_dualencoder/config.h | 4 ---- keyboards/dumbpad/v0x_dualencoder/info.json | 6 ++++++ keyboards/dumbpad/v0x_right/config.h | 4 ---- keyboards/dumbpad/v0x_right/info.json | 5 +++++ keyboards/dumbpad/v1x/config.h | 4 ---- keyboards/dumbpad/v1x/info.json | 5 +++++ keyboards/dumbpad/v1x_dualencoder/config.h | 4 ---- keyboards/dumbpad/v1x_dualencoder/info.json | 6 ++++++ keyboards/dumbpad/v1x_oled/config.h | 4 ---- keyboards/dumbpad/v1x_oled/info.json | 6 ++++++ keyboards/dumbpad/v1x_right/config.h | 4 ---- keyboards/dumbpad/v1x_right/info.json | 5 +++++ keyboards/dumbpad/v3x/config.h | 4 ---- keyboards/dumbpad/v3x/info.json | 5 +++++ keyboards/dyz/dyz40/config.h | 2 -- keyboards/dyz/dyz40/info.json | 5 +++++ keyboards/dyz/dyz60/config.h | 2 -- keyboards/dyz/dyz60/info.json | 5 +++++ keyboards/dyz/selka40/config.h | 2 -- keyboards/dyz/selka40/info.json | 5 +++++ 58 files changed, 185 insertions(+), 110 deletions(-) diff --git a/keyboards/dailycraft/owl8/config.h b/keyboards/dailycraft/owl8/config.h index 41efbbb6b51a..7da6e3f1bf27 100644 --- a/keyboards/dailycraft/owl8/config.h +++ b/keyboards/dailycraft/owl8/config.h @@ -37,6 +37,3 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -#define ENCODERS_PAD_A { D4, D7 } -#define ENCODERS_PAD_B { C6, E6 } diff --git a/keyboards/dailycraft/owl8/info.json b/keyboards/dailycraft/owl8/info.json index 1aed397e381a..ee1d19e7d669 100644 --- a/keyboards/dailycraft/owl8/info.json +++ b/keyboards/dailycraft/owl8/info.json @@ -8,6 +8,12 @@ "pid": "0x0008", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "C6"}, + {"pin_a": "D7", "pin_b": "E6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "matrix_pins": { diff --git a/keyboards/dailycraft/stickey4/config.h b/keyboards/dailycraft/stickey4/config.h index 41efbbb6b51a..7da6e3f1bf27 100644 --- a/keyboards/dailycraft/stickey4/config.h +++ b/keyboards/dailycraft/stickey4/config.h @@ -37,6 +37,3 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -#define ENCODERS_PAD_A { D4, D7 } -#define ENCODERS_PAD_B { C6, E6 } diff --git a/keyboards/dailycraft/stickey4/info.json b/keyboards/dailycraft/stickey4/info.json index 69dc1479a4ad..c8d580371885 100644 --- a/keyboards/dailycraft/stickey4/info.json +++ b/keyboards/dailycraft/stickey4/info.json @@ -8,6 +8,12 @@ "pid": "0x0010", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "C6"}, + {"pin_a": "D7", "pin_b": "E6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "matrix_pins": { diff --git a/keyboards/delikeeb/vaguettelite/config.h b/keyboards/delikeeb/vaguettelite/config.h index b430a301d7bc..3708284700ba 100644 --- a/keyboards/delikeeb/vaguettelite/config.h +++ b/keyboards/delikeeb/vaguettelite/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/*rotary encoder setting*/ -#define ENCODERS_PAD_A { D5, F1 } -#define ENCODERS_PAD_B { B7, F0 } - #define RGB_DI_PIN C7 #ifdef RGB_DI_PIN # define RGBLED_NUM 9 diff --git a/keyboards/delikeeb/vaguettelite/info.json b/keyboards/delikeeb/vaguettelite/info.json index 5558cac96fdd..e976a6a15540 100644 --- a/keyboards/delikeeb/vaguettelite/info.json +++ b/keyboards/delikeeb/vaguettelite/info.json @@ -8,6 +8,12 @@ "pid": "0x0011", "device_version": "0.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "D5", "pin_b": "B7"}, + {"pin_a": "F1", "pin_b": "F0"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/delikeeb/vanana/rev1/config.h b/keyboards/delikeeb/vanana/rev1/config.h index bf501e83abb7..d8a6d95c9b3d 100644 --- a/keyboards/delikeeb/vanana/rev1/config.h +++ b/keyboards/delikeeb/vanana/rev1/config.h @@ -33,9 +33,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Rotary Encoder and Buzzer */ -#define ENCODERS_PAD_A { C7, F1 } -#define ENCODERS_PAD_B { D5, F0 } #define B7_AUDIO #define RGB_DI_PIN F0 diff --git a/keyboards/delikeeb/vanana/rev1/info.json b/keyboards/delikeeb/vanana/rev1/info.json index 992960c5a2ee..4434ba95d749 100644 --- a/keyboards/delikeeb/vanana/rev1/info.json +++ b/keyboards/delikeeb/vanana/rev1/info.json @@ -2,5 +2,11 @@ "keyboard_name": "Vanana rev1", "usb": { "device_version": "0.0.1" + }, + "encoder": { + "rotary": [ + {"pin_a": "C7", "pin_b": "D5"}, + {"pin_a": "F1", "pin_b": "F0"} + ] } } diff --git a/keyboards/delikeeb/vanana/rev2/config.h b/keyboards/delikeeb/vanana/rev2/config.h index 687bb7a2942e..e28d974b78f3 100644 --- a/keyboards/delikeeb/vanana/rev2/config.h +++ b/keyboards/delikeeb/vanana/rev2/config.h @@ -33,9 +33,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Rotary Encoder and Buzzer */ -#define ENCODERS_PAD_A { B6, F0 } -#define ENCODERS_PAD_B { B2, F1 } #define B7_AUDIO #define RGB_DI_PIN C7 diff --git a/keyboards/delikeeb/vanana/rev2/info.json b/keyboards/delikeeb/vanana/rev2/info.json index c7206e9d9716..589c8c5089f1 100644 --- a/keyboards/delikeeb/vanana/rev2/info.json +++ b/keyboards/delikeeb/vanana/rev2/info.json @@ -2,5 +2,11 @@ "keyboard_name": "Vanana rev2", "usb": { "device_version": "0.0.2" + }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B2"}, + {"pin_a": "F0", "pin_b": "F1"} + ] } } diff --git a/keyboards/delikeeb/waaffle/rev3/config.h b/keyboards/delikeeb/waaffle/rev3/config.h index 48326e7f226b..4d5aa33be973 100644 --- a/keyboards/delikeeb/waaffle/rev3/config.h +++ b/keyboards/delikeeb/waaffle/rev3/config.h @@ -33,10 +33,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/*rotary encoder setting*/ -#define ENCODERS_PAD_A { B7, F1 } -#define ENCODERS_PAD_B { D5, F0 } - #define RGB_DI_PIN C7 #ifdef RGB_DI_PIN # define RGBLED_NUM 10 diff --git a/keyboards/delikeeb/waaffle/rev3/info.json b/keyboards/delikeeb/waaffle/rev3/info.json index 735a5cf16af9..8301a03813ed 100644 --- a/keyboards/delikeeb/waaffle/rev3/info.json +++ b/keyboards/delikeeb/waaffle/rev3/info.json @@ -8,6 +8,12 @@ "pid": "0x0012", "device_version": "0.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "B7", "pin_b": "D5"}, + {"pin_a": "F1", "pin_b": "F0"} + ] + }, "bootmagic": { "matrix": [6, 0] }, diff --git a/keyboards/dmqdesign/spin/config.h b/keyboards/dmqdesign/spin/config.h index a16e1454f63a..1e908ea0291c 100644 --- a/keyboards/dmqdesign/spin/config.h +++ b/keyboards/dmqdesign/spin/config.h @@ -26,10 +26,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -//rotary encoder setup -#define ENCODERS_PAD_A { B6, B4, D6 } -#define ENCODERS_PAD_B { B5, D7, D4 } - //Data pin for the 3 RGB LEDs #define RGB_DI_PIN D3 //Number of RGB LEDs diff --git a/keyboards/dmqdesign/spin/info.json b/keyboards/dmqdesign/spin/info.json index 2e5148236e2d..ff5101f8ea8f 100644 --- a/keyboards/dmqdesign/spin/info.json +++ b/keyboards/dmqdesign/spin/info.json @@ -8,6 +8,13 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B5"}, + {"pin_a": "B4", "pin_b": "D7"}, + {"pin_a": "D6", "pin_b": "D4"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/doio/kb16/rev1/config.h b/keyboards/doio/kb16/rev1/config.h index 5f30b9781219..aa066fe3933e 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 d8bf6e8b7391..d0acdedfb9b5 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 29367f26e84b..e7e2791ac8d2 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 28aa77b127cc..8b5eeb45c292 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 42e521c18d11..866bd3e1d92e 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 47ed0c3f4296..9fe8e831859f 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 416219d5c74b..740f1baea76b 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 9d75ada43ebb..227511295cb0 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": [ diff --git a/keyboards/doodboard/duckboard/config.h b/keyboards/doodboard/duckboard/config.h index bce35cc22e50..d4617a878615 100644 --- a/keyboards/doodboard/duckboard/config.h +++ b/keyboards/doodboard/duckboard/config.h @@ -21,10 +21,6 @@ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F6 } -#define ENCODER_RESOLUTION 2 - /* media key slowdown for windows */ #define TAP_CODE_DELAY 20 diff --git a/keyboards/doodboard/duckboard/info.json b/keyboards/doodboard/duckboard/info.json index 52915ac22242..f2ee7bb80a35 100644 --- a/keyboards/doodboard/duckboard/info.json +++ b/keyboards/doodboard/duckboard/info.json @@ -8,6 +8,11 @@ "pid": "0xFF44", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/doodboard/duckboard_r2/config.h b/keyboards/doodboard/duckboard_r2/config.h index dae2e086522b..d4617a878615 100644 --- a/keyboards/doodboard/duckboard_r2/config.h +++ b/keyboards/doodboard/duckboard_r2/config.h @@ -21,10 +21,6 @@ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } -#define ENCODERS_PAD_A { F6 } -#define ENCODERS_PAD_B { F5 } -#define ENCODER_RESOLUTION 2 - /* media key slowdown for windows */ #define TAP_CODE_DELAY 20 diff --git a/keyboards/doodboard/duckboard_r2/info.json b/keyboards/doodboard/duckboard_r2/info.json index 6483a4b1293e..b2de93f477c7 100644 --- a/keyboards/doodboard/duckboard_r2/info.json +++ b/keyboards/doodboard/duckboard_r2/info.json @@ -8,6 +8,11 @@ "pid": "0x6462", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F5", "resolution": 2} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/draculad/config.h b/keyboards/draculad/config.h index 9d6c41104235..63c16c1c710e 100644 --- a/keyboards/draculad/config.h +++ b/keyboards/draculad/config.h @@ -42,11 +42,6 @@ along with this program. If not, see . #define RGBLIGHT_SLEEP #endif -#define ENCODERS_PAD_A {B2 , B4} -#define ENCODERS_PAD_B {B6 , B5} - -#define ENCODER_RESOLUTIONS_RIGHT { 4, 1 } - #define EE_HANDS #define LAYER_STATE_8BIT diff --git a/keyboards/draculad/info.json b/keyboards/draculad/info.json index 310fa976593b..83b071e98bc0 100644 --- a/keyboards/draculad/info.json +++ b/keyboards/draculad/info.json @@ -8,8 +8,22 @@ "pid": "0x1B1E", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B6"}, + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B6", "resolution": 4}, + {"pin_a": "B4", "pin_b": "B5", "resolution": 1} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/draytronics/daisy/config.h b/keyboards/draytronics/daisy/config.h index f941fa5d058f..e701420bee72 100644 --- a/keyboards/draytronics/daisy/config.h +++ b/keyboards/draytronics/daisy/config.h @@ -33,8 +33,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B0, C0, C1} #define MATRIX_COL_PINS { C2, C3, C4, C5 } -#define ENCODERS_PAD_A { B1, D0 } -#define ENCODERS_PAD_B { B2, D1 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define TAP_CODE_DELAY 10 diff --git a/keyboards/draytronics/daisy/info.json b/keyboards/draytronics/daisy/info.json index 8b39ae5ba1ec..c847a456501f 100644 --- a/keyboards/draytronics/daisy/info.json +++ b/keyboards/draytronics/daisy/info.json @@ -8,6 +8,12 @@ "pid": "0x4441", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B2"}, + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "processor": "atmega328p", "bootloader": "usbasploader", "layout_aliases": { diff --git a/keyboards/drhigsby/bkf/config.h b/keyboards/drhigsby/bkf/config.h index 6e384d116233..e13ed8af9db5 100644 --- a/keyboards/drhigsby/bkf/config.h +++ b/keyboards/drhigsby/bkf/config.h @@ -31,10 +31,6 @@ #define MATRIX_ROW_PINS { F6, F7, B1, B3 } #define MATRIX_COL_PINS { B6, B2, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5 } -/* Define encoder pads */ -#define ENCODERS_PAD_A { F4 } -#define ENCODERS_PAD_B { F5 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/drhigsby/bkf/info.json b/keyboards/drhigsby/bkf/info.json index 20f2edd54f99..49a56a278620 100644 --- a/keyboards/drhigsby/bkf/info.json +++ b/keyboards/drhigsby/bkf/info.json @@ -8,6 +8,11 @@ "pid": "0x0003", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/drhigsby/packrat/config.h b/keyboards/drhigsby/packrat/config.h index d063077004d6..5700fad7d231 100644 --- a/keyboards/drhigsby/packrat/config.h +++ b/keyboards/drhigsby/packrat/config.h @@ -38,6 +38,3 @@ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } diff --git a/keyboards/drhigsby/packrat/info.json b/keyboards/drhigsby/packrat/info.json index 02d1e1e4c3c4..b9f924670125 100644 --- a/keyboards/drhigsby/packrat/info.json +++ b/keyboards/drhigsby/packrat/info.json @@ -8,6 +8,11 @@ "pid": "0x0004", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/dumbo/config.h b/keyboards/dumbo/config.h index fe1f5e44aadb..da4fb5b41088 100644 --- a/keyboards/dumbo/config.h +++ b/keyboards/dumbo/config.h @@ -19,11 +19,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D4, D7, E6, B4 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} -#define ENCODERS_PAD_A { F4, C6 } -#define ENCODERS_PAD_B { F5, B5 } -#define ENCODERS_PAD_A_RIGHT { F5, B5 } -#define ENCODERS_PAD_B_RIGHT { F4, C6 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dumbo/info.json b/keyboards/dumbo/info.json index 1b96eab73f0c..3fe1a8b4f838 100644 --- a/keyboards/dumbo/info.json +++ b/keyboards/dumbo/info.json @@ -8,8 +8,22 @@ "pid": "0x25E3", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"}, + {"pin_a": "C6", "pin_b": "B5"} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"}, + {"pin_a": "B5", "pin_b": "C6"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/dumbpad/v0x/config.h b/keyboards/dumbpad/v0x/config.h index d302a078d5be..2e605318d12b 100644 --- a/keyboards/dumbpad/v0x/config.h +++ b/keyboards/dumbpad/v0x/config.h @@ -21,10 +21,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } -/* Single rotary encoder */ -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D4 } - /* Onboard LEDs */ #define LED_00 B3 #define LED_01 B1 diff --git a/keyboards/dumbpad/v0x/info.json b/keyboards/dumbpad/v0x/info.json index 160b696fe249..cf6adb380161 100644 --- a/keyboards/dumbpad/v0x/info.json +++ b/keyboards/dumbpad/v0x/info.json @@ -2,6 +2,11 @@ "usb": { "device_version": "0.0.7" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D4"} + ] + }, "bootmagic": { "matrix": [3, 0] }, diff --git a/keyboards/dumbpad/v0x_dualencoder/config.h b/keyboards/dumbpad/v0x_dualencoder/config.h index 10e50bbb9962..92dd62ea17a6 100644 --- a/keyboards/dumbpad/v0x_dualencoder/config.h +++ b/keyboards/dumbpad/v0x_dualencoder/config.h @@ -21,10 +21,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D7, E6, B4, B5 } -/* Dual rotary encoders */ -#define ENCODERS_PAD_A { C6, D0 } -#define ENCODERS_PAD_B { D4, D1 } - /* Onboard LEDs */ #define LED_00 B3 #define LED_01 B1 diff --git a/keyboards/dumbpad/v0x_dualencoder/info.json b/keyboards/dumbpad/v0x_dualencoder/info.json index a12eecb8dc35..8b6294af5f98 100644 --- a/keyboards/dumbpad/v0x_dualencoder/info.json +++ b/keyboards/dumbpad/v0x_dualencoder/info.json @@ -2,6 +2,12 @@ "usb": { "device_version": "0.0.6" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "D4"}, + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "bootmagic": { "matrix": [3, 0] }, diff --git a/keyboards/dumbpad/v0x_right/config.h b/keyboards/dumbpad/v0x_right/config.h index 5eb5ae961c98..cdc8d665dcfe 100644 --- a/keyboards/dumbpad/v0x_right/config.h +++ b/keyboards/dumbpad/v0x_right/config.h @@ -20,10 +20,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } -/* Single rotary encoder */ -#define ENCODERS_PAD_A { D4 } -#define ENCODERS_PAD_B { D0 } - /* Onboard LEDs */ #define LED_00 B1 #define LED_01 B3 diff --git a/keyboards/dumbpad/v0x_right/info.json b/keyboards/dumbpad/v0x_right/info.json index dc01df1c323c..437d009dc863 100644 --- a/keyboards/dumbpad/v0x_right/info.json +++ b/keyboards/dumbpad/v0x_right/info.json @@ -2,6 +2,11 @@ "usb": { "device_version": "0.0.7" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "D0"} + ] + }, "bootmagic": { "matrix": [3, 4] }, diff --git a/keyboards/dumbpad/v1x/config.h b/keyboards/dumbpad/v1x/config.h index 421d1f7a1d00..09adca69e5c0 100644 --- a/keyboards/dumbpad/v1x/config.h +++ b/keyboards/dumbpad/v1x/config.h @@ -21,10 +21,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } -/* Single rotary encoder */ -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { D4 } - /* Onboard LEDs */ #define LED_00 B6 #define LED_01 B1 diff --git a/keyboards/dumbpad/v1x/info.json b/keyboards/dumbpad/v1x/info.json index f7da467561a5..8a3d27341519 100644 --- a/keyboards/dumbpad/v1x/info.json +++ b/keyboards/dumbpad/v1x/info.json @@ -2,6 +2,11 @@ "usb": { "device_version": "0.1.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "D4"} + ] + }, "bootmagic": { "matrix": [3, 0] }, diff --git a/keyboards/dumbpad/v1x_dualencoder/config.h b/keyboards/dumbpad/v1x_dualencoder/config.h index 9a7be81260a4..dce94fd8d4c4 100644 --- a/keyboards/dumbpad/v1x_dualencoder/config.h +++ b/keyboards/dumbpad/v1x_dualencoder/config.h @@ -21,10 +21,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } -/* Dual rotary encoders */ -#define ENCODERS_PAD_A { B2, D0 } -#define ENCODERS_PAD_B { D4, D1 } - /* Onboard LEDs */ #define LED_00 B6 #define LED_01 B1 diff --git a/keyboards/dumbpad/v1x_dualencoder/info.json b/keyboards/dumbpad/v1x_dualencoder/info.json index f7da467561a5..e51452897ac1 100644 --- a/keyboards/dumbpad/v1x_dualencoder/info.json +++ b/keyboards/dumbpad/v1x_dualencoder/info.json @@ -2,6 +2,12 @@ "usb": { "device_version": "0.1.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "D4"}, + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "bootmagic": { "matrix": [3, 0] }, diff --git a/keyboards/dumbpad/v1x_oled/config.h b/keyboards/dumbpad/v1x_oled/config.h index 4300694b822e..57fac8225fad 100644 --- a/keyboards/dumbpad/v1x_oled/config.h +++ b/keyboards/dumbpad/v1x_oled/config.h @@ -18,10 +18,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { C6, B1, B3, B2, B6 } -/* Dual rotary encoders */ -#define ENCODERS_PAD_A { B4, E6 } -#define ENCODERS_PAD_B { B5, D7 } - /* Column/Row IO definitions */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dumbpad/v1x_oled/info.json b/keyboards/dumbpad/v1x_oled/info.json index a20f41682ebc..7576fe2aa506 100644 --- a/keyboards/dumbpad/v1x_oled/info.json +++ b/keyboards/dumbpad/v1x_oled/info.json @@ -2,6 +2,12 @@ "usb": { "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"}, + {"pin_a": "E6", "pin_b": "D7"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/dumbpad/v1x_right/config.h b/keyboards/dumbpad/v1x_right/config.h index 9f6a109f8478..82f308f65135 100644 --- a/keyboards/dumbpad/v1x_right/config.h +++ b/keyboards/dumbpad/v1x_right/config.h @@ -21,10 +21,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } -/* Single rotary encoder */ -#define ENCODERS_PAD_A { D4 } -#define ENCODERS_PAD_B { B2 } - /* Onboard LEDs - reversed */ #define LED_00 B3 #define LED_01 B1 diff --git a/keyboards/dumbpad/v1x_right/info.json b/keyboards/dumbpad/v1x_right/info.json index db02b1aead70..6cef09807bf5 100644 --- a/keyboards/dumbpad/v1x_right/info.json +++ b/keyboards/dumbpad/v1x_right/info.json @@ -2,6 +2,11 @@ "usb": { "device_version": "0.1.0" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "B2"} + ] + }, "bootmagic": { "matrix": [3, 4] }, diff --git a/keyboards/dumbpad/v3x/config.h b/keyboards/dumbpad/v3x/config.h index a989bf9bafb8..2c00ba8eef24 100644 --- a/keyboards/dumbpad/v3x/config.h +++ b/keyboards/dumbpad/v3x/config.h @@ -20,10 +20,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } -/* Single rotary encoder */ -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { D4 } - /* Onboard LEDs */ #define LED_00 B1 #define LED_01 B3 diff --git a/keyboards/dumbpad/v3x/info.json b/keyboards/dumbpad/v3x/info.json index 31f44f74fed7..acdbe2c590bd 100644 --- a/keyboards/dumbpad/v3x/info.json +++ b/keyboards/dumbpad/v3x/info.json @@ -5,6 +5,11 @@ "usb": { "device_version": "0.1.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "D4"} + ] + }, "bootmagic": { "matrix": [3, 0] }, diff --git a/keyboards/dyz/dyz40/config.h b/keyboards/dyz/dyz40/config.h index 4a907fc8ece8..87e057133dcb 100644 --- a/keyboards/dyz/dyz40/config.h +++ b/keyboards/dyz/dyz40/config.h @@ -18,7 +18,5 @@ along with this program. If not, see . #pragma once #define TAP_CODE_DELAY 10 // Need this delay for some keys like VOLD/VOLU to work -#define ENCODERS_PAD_A { D1 } -#define ENCODERS_PAD_B { D0 } #define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/dyz/dyz40/info.json b/keyboards/dyz/dyz40/info.json index 7043ccc98d49..f1a4bc3f161b 100644 --- a/keyboards/dyz/dyz40/info.json +++ b/keyboards/dyz/dyz40/info.json @@ -8,6 +8,11 @@ "cols": ["E6", "F0", "F1", "F4", "F5", "F6", "F7", "C7", "C6", "B6", "B5", "B4", "D7"], "rows": ["B0", "B1", "B3", "B2"] }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"} + ] + }, "rgblight": { "led_count": 13, "pin": "B7", diff --git a/keyboards/dyz/dyz60/config.h b/keyboards/dyz/dyz60/config.h index bd80723d9294..87e057133dcb 100644 --- a/keyboards/dyz/dyz60/config.h +++ b/keyboards/dyz/dyz60/config.h @@ -18,7 +18,5 @@ along with this program. If not, see . #pragma once #define TAP_CODE_DELAY 10 // Need this delay for some keys like VOLD/VOLU to work -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D1 } #define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/dyz/dyz60/info.json b/keyboards/dyz/dyz60/info.json index 1f54c23d8e6b..413e0ac37950 100644 --- a/keyboards/dyz/dyz60/info.json +++ b/keyboards/dyz/dyz60/info.json @@ -32,6 +32,11 @@ "pid": "0x000A", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "indicators": { "caps_lock": "F1" }, diff --git a/keyboards/dyz/selka40/config.h b/keyboards/dyz/selka40/config.h index d93f882fb088..87e057133dcb 100644 --- a/keyboards/dyz/selka40/config.h +++ b/keyboards/dyz/selka40/config.h @@ -18,7 +18,5 @@ along with this program. If not, see . #pragma once #define TAP_CODE_DELAY 10 // Need this delay for some keys like VOLD/VOLU to work -#define ENCODERS_PAD_A { D6 } -#define ENCODERS_PAD_B { D7 } #define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/dyz/selka40/info.json b/keyboards/dyz/selka40/info.json index 246473ec3d57..7f3d04417c17 100644 --- a/keyboards/dyz/selka40/info.json +++ b/keyboards/dyz/selka40/info.json @@ -32,6 +32,11 @@ "pid": "0x0012", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D7"} + ] + }, "indicators": { "caps_lock": "B1", "num_lock": "B3", From 6b435655df1e846106ba691bac2b6c1a14923948 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:31:35 +1100 Subject: [PATCH 07/31] Move encoder config to info.json, E --- keyboards/ealdin/quadrant/config.h | 3 --- keyboards/ealdin/quadrant/info.json | 5 +++++ keyboards/ebastler/isometria_75/rev1/config.h | 7 ------- keyboards/ebastler/isometria_75/rev1/info.json | 5 +++++ keyboards/ein_60/config.h | 5 ----- keyboards/ein_60/info.json | 6 ++++++ keyboards/evolv/config.h | 3 --- keyboards/evolv/info.json | 5 +++++ keyboards/evyd13/atom47/rev4/config.h | 3 --- keyboards/evyd13/atom47/rev4/info.json | 5 +++++ keyboards/evyd13/eon40/config.h | 3 --- keyboards/evyd13/eon40/info.json | 7 +++++++ keyboards/evyd13/gh80_3700/config.h | 4 ---- keyboards/evyd13/gh80_3700/info.json | 5 +++++ keyboards/evyd13/ta65/config.h | 6 ------ keyboards/evyd13/ta65/info.json | 5 +++++ keyboards/eyeohdesigns/sprh/config.h | 6 ------ keyboards/eyeohdesigns/sprh/info.json | 5 +++++ keyboards/eyeohdesigns/theboulevard/config.h | 5 ----- keyboards/eyeohdesigns/theboulevard/info.json | 5 +++++ 20 files changed, 53 insertions(+), 45 deletions(-) diff --git a/keyboards/ealdin/quadrant/config.h b/keyboards/ealdin/quadrant/config.h index 3a9dfdecf11e..f4954fcd1198 100644 --- a/keyboards/ealdin/quadrant/config.h +++ b/keyboards/ealdin/quadrant/config.h @@ -24,9 +24,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D5 } -#define ENCODERS_PAD_B { F1 } - #define RGB_DI_PIN C7 #ifdef RGB_DI_PIN #define RGBLED_NUM 7 diff --git a/keyboards/ealdin/quadrant/info.json b/keyboards/ealdin/quadrant/info.json index e62de3f54f09..d8b388c33149 100644 --- a/keyboards/ealdin/quadrant/info.json +++ b/keyboards/ealdin/quadrant/info.json @@ -8,6 +8,11 @@ "pid": "0x5154", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D5", "pin_b": "F1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["ortho_5x14"], diff --git a/keyboards/ebastler/isometria_75/rev1/config.h b/keyboards/ebastler/isometria_75/rev1/config.h index 42cbedbd0155..9bba2a1aacea 100644 --- a/keyboards/ebastler/isometria_75/rev1/config.h +++ b/keyboards/ebastler/isometria_75/rev1/config.h @@ -46,13 +46,6 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - -/* Rotary encoder - set the resolution fitting your encoder. -Most will need a value of 4. If 1 encoder click results in 2 keycodes sent -increase the value. If you need 2 clicks for 1 keycode, decrease*/ -#define ENCODER_RESOLUTION 2 -#define ENCODERS_PAD_A { C15 } -#define ENCODERS_PAD_B { C14 } #define TAP_CODE_DELAY 10 /* ADC - will be used for battery monitoring once BT support is added */ diff --git a/keyboards/ebastler/isometria_75/rev1/info.json b/keyboards/ebastler/isometria_75/rev1/info.json index 37898f48466b..c9e69677f362 100644 --- a/keyboards/ebastler/isometria_75/rev1/info.json +++ b/keyboards/ebastler/isometria_75/rev1/info.json @@ -8,6 +8,11 @@ "pid": "0x1337", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C15", "pin_b": "C14", "resolution": 2} + ] + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/ein_60/config.h b/keyboards/ein_60/config.h index 946d01cd53b1..457f0a5013ed 100644 --- a/keyboards/ein_60/config.h +++ b/keyboards/ein_60/config.h @@ -23,11 +23,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW -#ifdef ENCODER_ENABLE -# define ENCODERS_PAD_A { B0, C5 } -# define ENCODERS_PAD_B { E3, C4 } -#endif - #ifdef OLED_ENABLE # define OLED_DISPLAY_128X64 # define OLED_TIMEOUT 450000 diff --git a/keyboards/ein_60/info.json b/keyboards/ein_60/info.json index 676915d9e638..3eaa251d7809 100644 --- a/keyboards/ein_60/info.json +++ b/keyboards/ein_60/info.json @@ -8,6 +8,12 @@ "pid": "0x0003", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "E3"}, + {"pin_a": "C5", "pin_b": "C4"} + ] + }, "processor": "at90usb1286", "bootloader": "qmk-dfu", "layouts": { diff --git a/keyboards/evolv/config.h b/keyboards/evolv/config.h index 2a7804e1a16b..c76fc98986d8 100644 --- a/keyboards/evolv/config.h +++ b/keyboards/evolv/config.h @@ -41,9 +41,6 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { A15 } -#define ENCODER_RESOLUTION 2 #define TAPPING_TERM 200 /* diff --git a/keyboards/evolv/info.json b/keyboards/evolv/info.json index b3b8a77a0279..76b428b1cd50 100644 --- a/keyboards/evolv/info.json +++ b/keyboards/evolv/info.json @@ -8,6 +8,11 @@ "pid": "0x0E75", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "A15", "resolution": 2} + ] + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/evyd13/atom47/rev4/config.h b/keyboards/evyd13/atom47/rev4/config.h index 3cd6d65e1a39..52a4bf2ff9b5 100644 --- a/keyboards/evyd13/atom47/rev4/config.h +++ b/keyboards/evyd13/atom47/rev4/config.h @@ -23,8 +23,5 @@ along with this program. If not, see . #define MATRIX_ROW_PINS {D0,C2,C5,C6} #define MATRIX_COL_PINS {C4,C7,B7,B6,B5,B2,B1,B0,D6,D5,D4,D3,D2} -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B4 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/atom47/rev4/info.json b/keyboards/evyd13/atom47/rev4/info.json index b89255f90ab7..42b8abda5412 100644 --- a/keyboards/evyd13/atom47/rev4/info.json +++ b/keyboards/evyd13/atom47/rev4/info.json @@ -8,6 +8,11 @@ "pid": "0x8446", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B4"} + ] + }, "qmk_lufa_bootloader": { "esc_input": "C6", "esc_output": "C4", diff --git a/keyboards/evyd13/eon40/config.h b/keyboards/evyd13/eon40/config.h index ca86bd78bcb6..2f1708d532b1 100644 --- a/keyboards/evyd13/eon40/config.h +++ b/keyboards/evyd13/eon40/config.h @@ -30,9 +30,6 @@ #define MATRIX_ROW_PINS {B7,D5,F5,F6} #define MATRIX_COL_PINS {F0,F1,F4,D3,D4,D6,D7,B4,B5,B6,C6,C7} -#define ENCODERS_PAD_A { E6, B0, D1 } -#define ENCODERS_PAD_B { F7, D0, D2 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/eon40/info.json b/keyboards/evyd13/eon40/info.json index 66bcb280ce8c..cda0c495a4bf 100644 --- a/keyboards/evyd13/eon40/info.json +++ b/keyboards/evyd13/eon40/info.json @@ -8,6 +8,13 @@ "pid": "0x0140", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E6", "pin_b": "F7"}, + {"pin_a": "B0", "pin_b": "D0"}, + {"pin_a": "D1", "pin_b": "D2"} + ] + }, "qmk_lufa_bootloader": { "esc_input": "B7", "esc_output": "F0" diff --git a/keyboards/evyd13/gh80_3700/config.h b/keyboards/evyd13/gh80_3700/config.h index 7e3a59e6316c..003131ceaeb2 100644 --- a/keyboards/evyd13/gh80_3700/config.h +++ b/keyboards/evyd13/gh80_3700/config.h @@ -53,7 +53,3 @@ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -// Define rotary encoder -#define ENCODERS_PAD_A { F1 } -#define ENCODERS_PAD_B { F4 } diff --git a/keyboards/evyd13/gh80_3700/info.json b/keyboards/evyd13/gh80_3700/info.json index 9a92b02d6efb..7ab1267ed9ba 100644 --- a/keyboards/evyd13/gh80_3700/info.json +++ b/keyboards/evyd13/gh80_3700/info.json @@ -8,6 +8,11 @@ "pid": "0x633A", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F1", "pin_b": "F4"} + ] + }, "processor": "atmega32u4", "bootloader": "qmk-dfu", "community_layouts": ["numpad_6x4", "ortho_6x4"], diff --git a/keyboards/evyd13/ta65/config.h b/keyboards/evyd13/ta65/config.h index 6bea2c459c14..ef8948786b31 100644 --- a/keyboards/evyd13/ta65/config.h +++ b/keyboards/evyd13/ta65/config.h @@ -23,12 +23,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS {B4,D7,D6,D4,B3} #define MATRIX_COL_PINS {D2,D1,D0,D3,D5,C7,C6,B6,B5,F0,F1,F4,F5,F6,F7,B0} -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B1 } - -/* Uncomment if your encoder doesn't react to every turn or skips */ -//#define ENCODER_RESOLUTION 2 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/ta65/info.json b/keyboards/evyd13/ta65/info.json index 4c52181f6790..da501c67567b 100644 --- a/keyboards/evyd13/ta65/info.json +++ b/keyboards/evyd13/ta65/info.json @@ -8,6 +8,11 @@ "pid": "0x7465", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B1"} + ] + }, "qmk_lufa_bootloader": { "esc_input": "B4", "esc_output": "D2", diff --git a/keyboards/eyeohdesigns/sprh/config.h b/keyboards/eyeohdesigns/sprh/config.h index f386c4033cac..31b6d017ce60 100644 --- a/keyboards/eyeohdesigns/sprh/config.h +++ b/keyboards/eyeohdesigns/sprh/config.h @@ -17,12 +17,6 @@ along with this program. If not, see . #pragma once - -#define ENCODERS_PAD_A {D0} -#define ENCODERS_PAD_B {D1} -#define ENCODER_RESOLUTION 2 - - #define MATRIX_ROW_PINS { B3, B7, D2, D5, D3 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, C6, B6, B5, B4, D7, D6, F7, D4 } diff --git a/keyboards/eyeohdesigns/sprh/info.json b/keyboards/eyeohdesigns/sprh/info.json index b61d4c95d5bc..bcef81b3106d 100644 --- a/keyboards/eyeohdesigns/sprh/info.json +++ b/keyboards/eyeohdesigns/sprh/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/eyeohdesigns/theboulevard/config.h b/keyboards/eyeohdesigns/theboulevard/config.h index 22143042a85b..081ab5021695 100644 --- a/keyboards/eyeohdesigns/theboulevard/config.h +++ b/keyboards/eyeohdesigns/theboulevard/config.h @@ -17,11 +17,6 @@ along with this program. If not, see . #pragma once - -#define ENCODERS_PAD_A {F5} -#define ENCODERS_PAD_B {F4} -#define ENCODER_RESOLUTION 2 - #define MATRIX_ROW_PINS { F7, B1, E6, F0, F1 } #define MATRIX_COL_PINS { B0, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } diff --git a/keyboards/eyeohdesigns/theboulevard/info.json b/keyboards/eyeohdesigns/theboulevard/info.json index 3fc238b3b905..0a1274290307 100644 --- a/keyboards/eyeohdesigns/theboulevard/info.json +++ b/keyboards/eyeohdesigns/theboulevard/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { From e89103ae5ab56bd4aa02ee5b45e4ce0d582b127c Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:31:44 +1100 Subject: [PATCH 08/31] Move encoder config to info.json, F --- keyboards/feker/ik75/config.h | 9 --------- keyboards/feker/ik75/info.json | 5 +++++ keyboards/ffkeebs/puca/config.h | 4 ---- keyboards/ffkeebs/puca/info.json | 5 +++++ keyboards/ffkeebs/siris/config.h | 3 --- keyboards/ffkeebs/siris/info.json | 6 ++++++ keyboards/flxlb/zplit/config.h | 3 --- keyboards/flxlb/zplit/info.json | 5 +++++ 8 files changed, 21 insertions(+), 19 deletions(-) diff --git a/keyboards/feker/ik75/config.h b/keyboards/feker/ik75/config.h index faddc42ce8c4..d05ae4f3fedd 100644 --- a/keyboards/feker/ik75/config.h +++ b/keyboards/feker/ik75/config.h @@ -25,15 +25,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL -#ifdef ENCODER_ENABLE - /* Encoder pins */ - #define ENCODERS_PAD_A { C6 } - #define ENCODERS_PAD_B { C7 } - - /* Encoder config */ - #define ENCODER_RESOLUTION 2 -#endif - #ifdef RGB_MATRIX_ENABLE #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 diff --git a/keyboards/feker/ik75/info.json b/keyboards/feker/ik75/info.json index 0fec2c9d4c07..2107909b3e62 100644 --- a/keyboards/feker/ik75/info.json +++ b/keyboards/feker/ik75/info.json @@ -8,6 +8,11 @@ "pid": "0x1226", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "C7", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/ffkeebs/puca/config.h b/keyboards/ffkeebs/puca/config.h index 81212585a933..6f88b36fe761 100644 --- a/keyboards/ffkeebs/puca/config.h +++ b/keyboards/ffkeebs/puca/config.h @@ -41,10 +41,6 @@ along with this program. If not, see . #define RGBLED_NUM 8 #endif - -#define ENCODERS_PAD_A { F4 } -#define ENCODERS_PAD_B { F5 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/ffkeebs/puca/info.json b/keyboards/ffkeebs/puca/info.json index 764daf878821..1cf9fd94ebd2 100644 --- a/keyboards/ffkeebs/puca/info.json +++ b/keyboards/ffkeebs/puca/info.json @@ -8,6 +8,11 @@ "pid": "0x0002", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layout_aliases": { diff --git a/keyboards/ffkeebs/siris/config.h b/keyboards/ffkeebs/siris/config.h index 831bb7a0e629..3e03a4020ea9 100644 --- a/keyboards/ffkeebs/siris/config.h +++ b/keyboards/ffkeebs/siris/config.h @@ -25,6 +25,3 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - -#define ENCODERS_PAD_A { D3, C6 } -#define ENCODERS_PAD_B { D5, B6 } diff --git a/keyboards/ffkeebs/siris/info.json b/keyboards/ffkeebs/siris/info.json index 335f80f65cc4..5da5369b7c46 100644 --- a/keyboards/ffkeebs/siris/info.json +++ b/keyboards/ffkeebs/siris/info.json @@ -8,6 +8,12 @@ "pid": "0xE96C", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D5"}, + {"pin_a": "C6", "pin_b": "B6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/flxlb/zplit/config.h b/keyboards/flxlb/zplit/config.h index ffd05b6e7db8..83dcb4fe421f 100644 --- a/keyboards/flxlb/zplit/config.h +++ b/keyboards/flxlb/zplit/config.h @@ -31,9 +31,6 @@ along with this program. If not, see . #define SPLIT_USB_DETECT #define SPLIT_USB_TIMEOUT 500 -#define ENCODERS_PAD_A { B0 } -#define ENCODERS_PAD_B { D2 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/flxlb/zplit/info.json b/keyboards/flxlb/zplit/info.json index 3d1619776f88..2cfb64b79345 100644 --- a/keyboards/flxlb/zplit/info.json +++ b/keyboards/flxlb/zplit/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "D2"} + ] + }, "split": { "soft_serial_pin": "D0" }, From d5dedc0c238f95509f1e7b1f335a2c0d454f0dcf Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:31:59 +1100 Subject: [PATCH 09/31] Move encoder config to info.json, G --- keyboards/giabalanai/config.h | 11 +---------- keyboards/giabalanai/info.json | 12 +++++++++++- keyboards/gl516/n51gl/config.h | 4 ---- keyboards/gl516/n51gl/info.json | 5 +++++ keyboards/gmmk/pro/config.h | 4 ---- keyboards/gmmk/pro/rev1/ansi/info.json | 5 +++++ keyboards/gmmk/pro/rev1/iso/info.json | 5 +++++ keyboards/gmmk/pro/rev2/ansi/info.json | 5 +++++ keyboards/gmmk/pro/rev2/iso/info.json | 5 +++++ keyboards/gorthage_truck/config.h | 3 --- keyboards/gorthage_truck/info.json | 5 +++++ 11 files changed, 42 insertions(+), 22 deletions(-) diff --git a/keyboards/giabalanai/config.h b/keyboards/giabalanai/config.h index ed349c5af3c6..01e84b4cdd82 100644 --- a/keyboards/giabalanai/config.h +++ b/keyboards/giabalanai/config.h @@ -220,16 +220,7 @@ along with this program. If not, see . # define MIDI_INITIAL_VELOCITY 117 #endif // MIDI_ENABLE -/* - * Encoder options - */ -#ifdef ENCODER_ENABLE -# define ENCODERS_PAD_A { } -# define ENCODERS_PAD_B { } -# define ENCODERS_PAD_A_RIGHT { B4 } -# define ENCODERS_PAD_B_RIGHT { B6 } -# define TAP_CODE_DELAY 10 -#endif // ENCODER_ENABLE +#define TAP_CODE_DELAY 10 /* 2021/01/22 added to shrink firmware size */ // NO_ACTION_TAPPING -1964 bytes, however, this disables Layer mods... diff --git a/keyboards/giabalanai/info.json b/keyboards/giabalanai/info.json index 05c0e67fdfd3..30bd26159f96 100644 --- a/keyboards/giabalanai/info.json +++ b/keyboards/giabalanai/info.json @@ -8,8 +8,18 @@ "pid": "0xF4B0", "device_version": "0.0.1" }, + "encoder": { + "rotary": [] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B6"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/gl516/n51gl/config.h b/keyboards/gl516/n51gl/config.h index ee71cdbca74e..276e6f6c6d8b 100644 --- a/keyboards/gl516/n51gl/config.h +++ b/keyboards/gl516/n51gl/config.h @@ -26,10 +26,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D1, D0, D4, C6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define ENCODERS_PAD_A { D7 } -#define ENCODERS_PAD_B { E6 } -#define ENCODER_RESOLUTION 3 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/gl516/n51gl/info.json b/keyboards/gl516/n51gl/info.json index 50607c3f8f16..eaaf6e69dd96 100644 --- a/keyboards/gl516/n51gl/info.json +++ b/keyboards/gl516/n51gl/info.json @@ -8,6 +8,11 @@ "pid": "0xE8CF", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D7", "pin_b": "E6", "resolution": 3} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/gmmk/pro/config.h b/keyboards/gmmk/pro/config.h index 73e8e75bdf9e..c633d722a09c 100644 --- a/keyboards/gmmk/pro/config.h +++ b/keyboards/gmmk/pro/config.h @@ -26,10 +26,6 @@ #define DIODE_DIRECTION COL2ROW #define TAP_CODE_DELAY 10 -#define ENCODERS_PAD_A \ - { C15 } -#define ENCODERS_PAD_B \ - { C14 } /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/gmmk/pro/rev1/ansi/info.json b/keyboards/gmmk/pro/rev1/ansi/info.json index 58636b462b88..b8a7e94a82f3 100644 --- a/keyboards/gmmk/pro/rev1/ansi/info.json +++ b/keyboards/gmmk/pro/rev1/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x5044", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C15", "pin_b": "C14"} + ] + }, "bootmagic": { "matrix": [1, 3] }, diff --git a/keyboards/gmmk/pro/rev1/iso/info.json b/keyboards/gmmk/pro/rev1/iso/info.json index dce316167a07..48181ec488a4 100644 --- a/keyboards/gmmk/pro/rev1/iso/info.json +++ b/keyboards/gmmk/pro/rev1/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x5044", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C15", "pin_b": "C14"} + ] + }, "bootmagic": { "matrix": [1, 3] }, diff --git a/keyboards/gmmk/pro/rev2/ansi/info.json b/keyboards/gmmk/pro/rev2/ansi/info.json index 37b2e4b1cc6f..a8a25f854707 100644 --- a/keyboards/gmmk/pro/rev2/ansi/info.json +++ b/keyboards/gmmk/pro/rev2/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x5044", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "C15", "pin_b": "C14"} + ] + }, "bootmagic": { "matrix": [1, 3] }, diff --git a/keyboards/gmmk/pro/rev2/iso/info.json b/keyboards/gmmk/pro/rev2/iso/info.json index 10eaa5474bea..c37ccd53df8c 100644 --- a/keyboards/gmmk/pro/rev2/iso/info.json +++ b/keyboards/gmmk/pro/rev2/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x5044", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "C15", "pin_b": "C14"} + ] + }, "bootmagic": { "matrix": [1, 3] }, diff --git a/keyboards/gorthage_truck/config.h b/keyboards/gorthage_truck/config.h index 9fc348cc7314..56b84cb4271b 100644 --- a/keyboards/gorthage_truck/config.h +++ b/keyboards/gorthage_truck/config.h @@ -33,6 +33,3 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW - -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F6 } diff --git a/keyboards/gorthage_truck/info.json b/keyboards/gorthage_truck/info.json index 34ba7b23a0d5..fe5b37c6b855 100644 --- a/keyboards/gorthage_truck/info.json +++ b/keyboards/gorthage_truck/info.json @@ -8,6 +8,11 @@ "pid": "0x58E4", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "indicators": { "caps_lock": "D3", "num_lock": "D5", From 4dcf2ee415474b693e74fc0811067e919f5cc9e1 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:33:39 +1100 Subject: [PATCH 10/31] Move encoder config to info.json, H --- keyboards/h0oni/deskpad/config.h | 4 ---- keyboards/h0oni/deskpad/info.json | 5 +++++ keyboards/hadron/ver3/config.h | 4 ---- keyboards/hadron/ver3/info.json | 5 +++++ keyboards/halfcliff/config.h | 5 ----- keyboards/halfcliff/info.json | 5 +++++ keyboards/halokeys/elemental75/config.h | 2 -- keyboards/halokeys/elemental75/info.json | 5 +++++ keyboards/helix/rev3_4rows/config.h | 4 ---- keyboards/helix/rev3_4rows/info.json | 5 +++++ keyboards/helix/rev3_5rows/config.h | 4 ---- keyboards/helix/rev3_5rows/info.json | 5 +++++ keyboards/hillside/46/0_1/config.h | 6 ------ keyboards/hillside/46/0_1/info.json | 14 +++++++++++++- keyboards/hillside/48/0_1/config.h | 7 ------- keyboards/hillside/48/0_1/info.json | 14 +++++++++++++- keyboards/hillside/52/0_1/config.h | 6 ------ keyboards/hillside/52/0_1/info.json | 14 +++++++++++++- keyboards/hnahkb/vn66/config.h | 4 ---- keyboards/hnahkb/vn66/info.json | 5 +++++ keyboards/hub16/config.h | 7 ------- keyboards/hub16/info.json | 6 ++++++ keyboards/hub20/config.h | 5 ----- keyboards/hub20/info.json | 6 ++++++ 24 files changed, 86 insertions(+), 61 deletions(-) diff --git a/keyboards/h0oni/deskpad/config.h b/keyboards/h0oni/deskpad/config.h index a9b932daf4a9..ec6c3b733ddd 100644 --- a/keyboards/h0oni/deskpad/config.h +++ b/keyboards/h0oni/deskpad/config.h @@ -33,10 +33,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Defining encoder pads */ -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D3 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/h0oni/deskpad/info.json b/keyboards/h0oni/deskpad/info.json index 30d3e3d32ea7..2c553313c8af 100644 --- a/keyboards/h0oni/deskpad/info.json +++ b/keyboards/h0oni/deskpad/info.json @@ -8,6 +8,11 @@ "pid": "0x4450", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D3"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 3, diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index 97ab4c6a439f..64d1d41b0fbb 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -33,10 +33,6 @@ #define MATRIX_ROW_PINS { C15, C14, A10, A9, A8 } #define MATRIX_COL_PINS { B8, B2, B10, A0, A1, A2, B0, A3, B1, A6, A7, B12, C13, B11, B9 } -#define ENCODERS_PAD_A { B13 } -#define ENCODERS_PAD_B { B14 } - - //Audio #undef AUDIO_VOICES #undef AUDIO_PIN diff --git a/keyboards/hadron/ver3/info.json b/keyboards/hadron/ver3/info.json index ec89f3225366..2fd5bda88101 100644 --- a/keyboards/hadron/ver3/info.json +++ b/keyboards/hadron/ver3/info.json @@ -2,6 +2,11 @@ "usb": { "device_version": "0.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "B13", "pin_b": "B14"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "board": "QMK_PROTON_C" diff --git a/keyboards/halfcliff/config.h b/keyboards/halfcliff/config.h index 1185bee5e776..07d53e4e4997 100644 --- a/keyboards/halfcliff/config.h +++ b/keyboards/halfcliff/config.h @@ -25,11 +25,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F5, F6, F7, D7, B5, F5, F6, F7, D7, B5 } #define MATRIX_COL_PINS { B4, E6, C6, B6, B2 } -//#define NUMBER_OF_ENCODERS 1 -#define ENCODERS_PAD_A { D4 } -#define ENCODERS_PAD_B { F4 } -#define ENCODER_RESOLUTION 2 - #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN #define RGBLED_NUM 10 diff --git a/keyboards/halfcliff/info.json b/keyboards/halfcliff/info.json index 1282ab2ffe69..aa97f81a7334 100644 --- a/keyboards/halfcliff/info.json +++ b/keyboards/halfcliff/info.json @@ -8,6 +8,11 @@ "pid": "0x0021", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "F4", "resolution": 2} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/halokeys/elemental75/config.h b/keyboards/halokeys/elemental75/config.h index 61eeea4e017b..0ecdf933b0b2 100644 --- a/keyboards/halokeys/elemental75/config.h +++ b/keyboards/halokeys/elemental75/config.h @@ -19,8 +19,6 @@ #define MATRIX_COL_PINS { B2, B1, B0, B10, B11, B13, B14, B15, A8, A9, A14, A15, B3, B4, B7 } #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B6 } -#define ENCODERS_PAD_B { B5 } #define TAP_CODE_DELAY 10 // tap_code function delay for register and unregister #define RGB_DI_PIN A10 diff --git a/keyboards/halokeys/elemental75/info.json b/keyboards/halokeys/elemental75/info.json index 50ae0900fbe6..191b10554207 100644 --- a/keyboards/halokeys/elemental75/info.json +++ b/keyboards/halokeys/elemental75/info.json @@ -8,6 +8,11 @@ "pid": "0xEA75", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B5"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "board": "QMK_PROTON_C", diff --git a/keyboards/helix/rev3_4rows/config.h b/keyboards/helix/rev3_4rows/config.h index 083b95c8aded..97b4ed3f486f 100644 --- a/keyboards/helix/rev3_4rows/config.h +++ b/keyboards/helix/rev3_4rows/config.h @@ -86,10 +86,6 @@ along with this program. If not, see . /* Custom font */ #define OLED_FONT_H "keyboards/helix/common/glcdfont.c" -/* Encorder */ -#define ENCODERS_PAD_A { B6 } -#define ENCODERS_PAD_B { B5 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/helix/rev3_4rows/info.json b/keyboards/helix/rev3_4rows/info.json index d37df4d4c501..45945f88719e 100644 --- a/keyboards/helix/rev3_4rows/info.json +++ b/keyboards/helix/rev3_4rows/info.json @@ -8,6 +8,11 @@ "pid": "0x0004", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B5"} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/helix/rev3_5rows/config.h b/keyboards/helix/rev3_5rows/config.h index 2f6ea61bb6ac..a047bd7d878c 100644 --- a/keyboards/helix/rev3_5rows/config.h +++ b/keyboards/helix/rev3_5rows/config.h @@ -86,10 +86,6 @@ along with this program. If not, see . /* Custom font */ #define OLED_FONT_H "keyboards/helix/common/glcdfont.c" -/* Encorder */ -#define ENCODERS_PAD_A { B6 } -#define ENCODERS_PAD_B { B5 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/helix/rev3_5rows/info.json b/keyboards/helix/rev3_5rows/info.json index 6d7786d213c0..9709708d68e5 100644 --- a/keyboards/helix/rev3_5rows/info.json +++ b/keyboards/helix/rev3_5rows/info.json @@ -8,6 +8,11 @@ "pid": "0x0003", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B5"} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/hillside/46/0_1/config.h b/keyboards/hillside/46/0_1/config.h index e1464871bad0..81736ff17598 100644 --- a/keyboards/hillside/46/0_1/config.h +++ b/keyboards/hillside/46/0_1/config.h @@ -8,12 +8,6 @@ #define SPLIT_HAND_MATRIX_GRID B5, F6 #define MATRIX_MASKED -/* Encoder */ -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } -#define ENCODERS_PAD_A_RIGHT { F4 } -#define ENCODERS_PAD_B_RIGHT { F5 } - #define RGBLIGHT_SLEEP /* Haptic hardware */ diff --git a/keyboards/hillside/46/0_1/info.json b/keyboards/hillside/46/0_1/info.json index 29a23aad809f..f18bd158cca7 100644 --- a/keyboards/hillside/46/0_1/info.json +++ b/keyboards/hillside/46/0_1/info.json @@ -13,6 +13,11 @@ "pid": "0x4846", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + }, "features": { "encoder": true, @@ -20,7 +25,14 @@ "rgblight": true }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + } + } }, "rgblight": { diff --git a/keyboards/hillside/48/0_1/config.h b/keyboards/hillside/48/0_1/config.h index 5e2ba6018ae9..72f1a842c775 100644 --- a/keyboards/hillside/48/0_1/config.h +++ b/keyboards/hillside/48/0_1/config.h @@ -3,13 +3,6 @@ #pragma once - -/* Encoder */ -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } -#define ENCODERS_PAD_A_RIGHT { F4 } -#define ENCODERS_PAD_B_RIGHT { F5 } - #define RGBLIGHT_SLEEP /* Haptic hardware */ diff --git a/keyboards/hillside/48/0_1/info.json b/keyboards/hillside/48/0_1/info.json index 943982d65e70..aa03a7a4f926 100644 --- a/keyboards/hillside/48/0_1/info.json +++ b/keyboards/hillside/48/0_1/info.json @@ -13,6 +13,11 @@ "pid": "0x67C0", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + }, "features": { "encoder": true, @@ -21,7 +26,14 @@ }, "split": { "soft_serial_pin": "D2", - "main": "left" + "main": "left", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + } + } }, "rgblight": { diff --git a/keyboards/hillside/52/0_1/config.h b/keyboards/hillside/52/0_1/config.h index e1464871bad0..81736ff17598 100644 --- a/keyboards/hillside/52/0_1/config.h +++ b/keyboards/hillside/52/0_1/config.h @@ -8,12 +8,6 @@ #define SPLIT_HAND_MATRIX_GRID B5, F6 #define MATRIX_MASKED -/* Encoder */ -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } -#define ENCODERS_PAD_A_RIGHT { F4 } -#define ENCODERS_PAD_B_RIGHT { F5 } - #define RGBLIGHT_SLEEP /* Haptic hardware */ diff --git a/keyboards/hillside/52/0_1/info.json b/keyboards/hillside/52/0_1/info.json index f5cf4486d5ae..e803ed52beb5 100644 --- a/keyboards/hillside/52/0_1/info.json +++ b/keyboards/hillside/52/0_1/info.json @@ -13,6 +13,11 @@ "pid": "0x4852", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + }, "features": { "encoder": true, @@ -20,7 +25,14 @@ "rgblight": true }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + } + } }, "rgblight": { diff --git a/keyboards/hnahkb/vn66/config.h b/keyboards/hnahkb/vn66/config.h index 780ed729a3b2..3b29f09d13b5 100644 --- a/keyboards/hnahkb/vn66/config.h +++ b/keyboards/hnahkb/vn66/config.h @@ -38,10 +38,6 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 4 #define BACKLIGHT_BREATHING -#define ENCODERS_PAD_A { B0 } -#define ENCODERS_PAD_B { B7 } -#define ENCODER_RESOLUTION 2 - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN # define RGBLED_NUM 20 diff --git a/keyboards/hnahkb/vn66/info.json b/keyboards/hnahkb/vn66/info.json index a85d29b64487..8ec5117c65b8 100644 --- a/keyboards/hnahkb/vn66/info.json +++ b/keyboards/hnahkb/vn66/info.json @@ -8,6 +8,11 @@ "pid": "0xCA2C", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B7", "resolution": 2} + ] + }, "indicators": { "caps_lock": "E6", "on_state": 0 diff --git a/keyboards/hub16/config.h b/keyboards/hub16/config.h index 83f0ac5b2399..8eb865e9b337 100755 --- a/keyboards/hub16/config.h +++ b/keyboards/hub16/config.h @@ -44,13 +44,6 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -/* ENCODER THINGS */ -// #define ENCODER_DIRECTION_FLIP -#define ENCODERS_PAD_A \ - { F5, B5 } -#define ENCODERS_PAD_B \ - { F6, B4 } - /* Tap Dance timing */ #define TAPPING_TERM 200 diff --git a/keyboards/hub16/info.json b/keyboards/hub16/info.json index ec1f3fc2cd5d..0da7c129eb6a 100644 --- a/keyboards/hub16/info.json +++ b/keyboards/hub16/info.json @@ -8,6 +8,12 @@ "pid": "0x4810", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"}, + {"pin_a": "B5", "pin_b": "B4"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "debounce": 20, diff --git a/keyboards/hub20/config.h b/keyboards/hub20/config.h index ad95e4f38c22..41a98ac9834c 100644 --- a/keyboards/hub20/config.h +++ b/keyboards/hub20/config.h @@ -24,11 +24,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* Rotary Encoder Things */ -// #define ENCODER_DIRECTION_FLIP -#define ENCODERS_PAD_A { B12, A8 } -#define ENCODERS_PAD_B { B13, A9 } - #define RGB_DI_PIN B15 #define RGBLED_NUM 27 diff --git a/keyboards/hub20/info.json b/keyboards/hub20/info.json index a8f678cb243a..10ec779fdf46 100644 --- a/keyboards/hub20/info.json +++ b/keyboards/hub20/info.json @@ -8,6 +8,12 @@ "pid": "0x4414", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B12", "pin_b": "B13"}, + {"pin_a": "A8", "pin_b": "A9"} + ] + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "layouts": { From bd9bff66a735aa310f754172e096736a27ea2afd Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:33:51 +1100 Subject: [PATCH 11/31] Move encoder config to info.json, handwired --- keyboards/handwired/amigopunk/config.h | 6 ------ keyboards/handwired/amigopunk/info.json | 5 +++++ keyboards/handwired/bento/rev1/config.h | 3 --- keyboards/handwired/bento/rev1/info.json | 5 +++++ keyboards/handwired/d48/config.h | 4 ---- keyboards/handwired/d48/info.json | 6 ++++++ keyboards/handwired/dactylmacropad/config.h | 3 --- keyboards/handwired/dactylmacropad/info.json | 5 +++++ keyboards/handwired/daishi/config.h | 5 ----- keyboards/handwired/daishi/info.json | 5 +++++ keyboards/handwired/dc/mc/001/config.h | 9 --------- keyboards/handwired/dc/mc/001/info.json | 5 +++++ keyboards/handwired/ddg_56/config.h | 3 --- keyboards/handwired/ddg_56/info.json | 6 ++++++ keyboards/handwired/frankie_macropad/config.h | 3 --- keyboards/handwired/frankie_macropad/info.json | 6 ++++++ keyboards/handwired/hnah108/config.h | 3 --- keyboards/handwired/hnah108/info.json | 5 +++++ keyboards/handwired/mutepad/config.h | 8 -------- keyboards/handwired/mutepad/info.json | 5 +++++ keyboards/handwired/obuwunkunubi/spaget/config.h | 4 ---- keyboards/handwired/obuwunkunubi/spaget/info.json | 6 ++++++ keyboards/handwired/pill60/config.h | 7 ------- keyboards/handwired/pill60/info.json | 5 +++++ keyboards/handwired/prkl30/feather/config.h | 2 -- keyboards/handwired/prkl30/feather/info.json | 7 +++++++ keyboards/handwired/prkl30/promicro/config.h | 2 -- keyboards/handwired/prkl30/promicro/info.json | 7 +++++++ keyboards/handwired/snatchpad/config.h | 4 ---- keyboards/handwired/snatchpad/info.json | 6 ++++++ keyboards/handwired/swiftrax/bumblebee/config.h | 4 ---- keyboards/handwired/swiftrax/bumblebee/info.json | 5 +++++ keyboards/handwired/swiftrax/digicarp65/config.h | 3 --- keyboards/handwired/swiftrax/digicarp65/info.json | 5 +++++ keyboards/handwired/swiftrax/joypad/config.h | 3 --- keyboards/handwired/swiftrax/joypad/info.json | 5 +++++ keyboards/handwired/swiftrax/pandamic/config.h | 4 ---- keyboards/handwired/swiftrax/pandamic/info.json | 5 +++++ keyboards/handwired/swiftrax/walter/config.h | 3 --- keyboards/handwired/swiftrax/walter/info.json | 5 +++++ .../tractyl_manuform/5x6_right/elite_c/config.h | 5 ----- .../tractyl_manuform/5x6_right/elite_c/info.json | 5 +++++ .../handwired/tractyl_manuform/5x6_right/f303/config.h | 6 ------ .../handwired/tractyl_manuform/5x6_right/f303/info.json | 5 +++++ .../handwired/tractyl_manuform/5x6_right/f411/config.h | 6 ------ .../handwired/tractyl_manuform/5x6_right/f411/info.json | 5 +++++ .../tractyl_manuform/5x6_right/teensy2pp/config.h | 5 ----- .../tractyl_manuform/5x6_right/teensy2pp/info.json | 5 +++++ keyboards/handwired/uthol/rev3/config.h | 8 -------- keyboards/handwired/uthol/rev3/info.json | 5 +++++ 50 files changed, 134 insertions(+), 113 deletions(-) create mode 100644 keyboards/handwired/prkl30/feather/info.json create mode 100644 keyboards/handwired/prkl30/promicro/info.json diff --git a/keyboards/handwired/amigopunk/config.h b/keyboards/handwired/amigopunk/config.h index 78f8271f8409..2cbbb3152a5c 100644 --- a/keyboards/handwired/amigopunk/config.h +++ b/keyboards/handwired/amigopunk/config.h @@ -24,12 +24,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Encoder setup */ -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A { E0 } -#define ENCODERS_PAD_B { E1 } -#endif - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/amigopunk/info.json b/keyboards/handwired/amigopunk/info.json index 2f98f2c7557d..e79911a67632 100644 --- a/keyboards/handwired/amigopunk/info.json +++ b/keyboards/handwired/amigopunk/info.json @@ -8,6 +8,11 @@ "pid": "0x1805", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E0", "pin_b": "E1"} + ] + }, "processor": "at90usb1286", "bootloader": "halfkay", "layouts": { diff --git a/keyboards/handwired/bento/rev1/config.h b/keyboards/handwired/bento/rev1/config.h index 497a2deb16c3..62c3144cc554 100644 --- a/keyboards/handwired/bento/rev1/config.h +++ b/keyboards/handwired/bento/rev1/config.h @@ -16,9 +16,6 @@ #pragma once -#define ENCODERS_PAD_A { D1 } -#define ENCODERS_PAD_B { D0 } - #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN #define RGBLED_NUM 4 diff --git a/keyboards/handwired/bento/rev1/info.json b/keyboards/handwired/bento/rev1/info.json index 057931bb4e54..5f7e67330624 100644 --- a/keyboards/handwired/bento/rev1/info.json +++ b/keyboards/handwired/bento/rev1/info.json @@ -8,6 +8,11 @@ "pid": "0xDAD3", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/handwired/d48/config.h b/keyboards/handwired/d48/config.h index dfaeacdcf767..23dbfa831cd7 100644 --- a/keyboards/handwired/d48/config.h +++ b/keyboards/handwired/d48/config.h @@ -40,10 +40,6 @@ ) #endif -/* Encoders */ -#define ENCODERS_PAD_A { B3, A0 } -#define ENCODERS_PAD_B { A6, A1 } - /* OLED */ #define OLED_FONT_H "glcdfont_d48.c" #define OLED_TIMEOUT 0 diff --git a/keyboards/handwired/d48/info.json b/keyboards/handwired/d48/info.json index 9da51d59593a..c607f21937f3 100644 --- a/keyboards/handwired/d48/info.json +++ b/keyboards/handwired/d48/info.json @@ -8,6 +8,12 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "A6"}, + {"pin_a": "A0", "pin_b": "A1"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "board": "QMK_PROTON_C", diff --git a/keyboards/handwired/dactylmacropad/config.h b/keyboards/handwired/dactylmacropad/config.h index f253d568e00a..a2a5455ab148 100644 --- a/keyboards/handwired/dactylmacropad/config.h +++ b/keyboards/handwired/dactylmacropad/config.h @@ -19,7 +19,4 @@ //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -#define ENCODERS_PAD_A { D1 } -#define ENCODERS_PAD_B { D0 } - #define TAP_CODE_DELAY 100 diff --git a/keyboards/handwired/dactylmacropad/info.json b/keyboards/handwired/dactylmacropad/info.json index b56174caa2f0..1f56982b6dde 100644 --- a/keyboards/handwired/dactylmacropad/info.json +++ b/keyboards/handwired/dactylmacropad/info.json @@ -23,6 +23,11 @@ "pid": "0x0000", "vid": "0xFEED" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"} + ] + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/handwired/daishi/config.h b/keyboards/handwired/daishi/config.h index 6a5d485d7fe4..1fefa56fc60b 100644 --- a/keyboards/handwired/daishi/config.h +++ b/keyboards/handwired/daishi/config.h @@ -34,10 +34,5 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Set up rotary encoder */ -#define ENCODERS_PAD_A { F1 } -#define ENCODERS_PAD_B { F0 } -#define ENCODER_RESOLUTION 2 - /* Set delay for tap_code on rotary encoder */ #define TAP_CODE_DELAY 10 diff --git a/keyboards/handwired/daishi/info.json b/keyboards/handwired/daishi/info.json index a28c8855373e..27671cc28a7a 100644 --- a/keyboards/handwired/daishi/info.json +++ b/keyboards/handwired/daishi/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F1", "pin_b": "F0", "resolution": 2} + ] + }, "processor": "at90usb1286", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/handwired/dc/mc/001/config.h b/keyboards/handwired/dc/mc/001/config.h index de8c26cb13b0..4e9dfdea8cc9 100644 --- a/keyboards/handwired/dc/mc/001/config.h +++ b/keyboards/handwired/dc/mc/001/config.h @@ -17,15 +17,6 @@ along with this program. If not, see . #pragma once -/* - RE_CHANNEL_A = _BV(6), - RE_CHANNEL_B = _BV(5), -*/ -#define ENCODERS_PAD_A \ - { B6 } -#define ENCODERS_PAD_B \ - { B5 } - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/dc/mc/001/info.json b/keyboards/handwired/dc/mc/001/info.json index 78c75f37133c..852915569ed8 100644 --- a/keyboards/handwired/dc/mc/001/info.json +++ b/keyboards/handwired/dc/mc/001/info.json @@ -8,6 +8,11 @@ "pid": "0x4D43", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B5"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/handwired/ddg_56/config.h b/keyboards/handwired/ddg_56/config.h index a9b3c12ef236..e46edef395e9 100644 --- a/keyboards/handwired/ddg_56/config.h +++ b/keyboards/handwired/ddg_56/config.h @@ -19,6 +19,3 @@ #define MATRIX_ROW_PINS { B5, B15, B9, B10, A14 } #define MATRIX_COL_PINS { A2, B8, B13, B14, B4, B11, B12, A13, A15, A8, A7, A6, B0, B1 } - -#define ENCODERS_PAD_A { A1, B3 } -#define ENCODERS_PAD_B { A0, B2 } diff --git a/keyboards/handwired/ddg_56/info.json b/keyboards/handwired/ddg_56/info.json index 2b7a8cfc4387..f7253711e4f2 100644 --- a/keyboards/handwired/ddg_56/info.json +++ b/keyboards/handwired/ddg_56/info.json @@ -8,6 +8,12 @@ "pid": "0xB195", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A1", "pin_b": "A0"}, + {"pin_a": "B3", "pin_b": "B2"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "board": "QMK_PROTON_C", diff --git a/keyboards/handwired/frankie_macropad/config.h b/keyboards/handwired/frankie_macropad/config.h index 8045d59c670f..577b27b37201 100644 --- a/keyboards/handwired/frankie_macropad/config.h +++ b/keyboards/handwired/frankie_macropad/config.h @@ -49,6 +49,3 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING #define NO_ACTION_ONESHOT - -#define ENCODERS_PAD_A { D0, D2 } -#define ENCODERS_PAD_B { D1, D3 } diff --git a/keyboards/handwired/frankie_macropad/info.json b/keyboards/handwired/frankie_macropad/info.json index 3ddf4075495e..24fb55f5daf7 100644 --- a/keyboards/handwired/frankie_macropad/info.json +++ b/keyboards/handwired/frankie_macropad/info.json @@ -8,6 +8,12 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"}, + {"pin_a": "D2", "pin_b": "D3"} + ] + }, "bootmagic": { "matrix": [2, 0] }, diff --git a/keyboards/handwired/hnah108/config.h b/keyboards/handwired/hnah108/config.h index 13367a2577c2..7e5c89ceb318 100644 --- a/keyboards/handwired/hnah108/config.h +++ b/keyboards/handwired/hnah108/config.h @@ -34,9 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B3 } - #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/handwired/hnah108/info.json b/keyboards/handwired/hnah108/info.json index 257fcf279cde..f7fdf0a20ace 100644 --- a/keyboards/handwired/hnah108/info.json +++ b/keyboards/handwired/hnah108/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/handwired/mutepad/config.h b/keyboards/handwired/mutepad/config.h index 97ba13cd6a64..9ebec0ffef68 100644 --- a/keyboards/handwired/mutepad/config.h +++ b/keyboards/handwired/mutepad/config.h @@ -19,14 +19,6 @@ #define MATRIX_COL_PINS \ { B1, B3, B2, B6 } -/* encoder support */ -#define ENCODERS_PAD_A \ - { F4 } -#define ENCODERS_PAD_B \ - { F5 } - -#define ENCODER_RESOLUTION 2 - #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/handwired/mutepad/info.json b/keyboards/handwired/mutepad/info.json index 408ecffc51e0..6068f33b9dcc 100644 --- a/keyboards/handwired/mutepad/info.json +++ b/keyboards/handwired/mutepad/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/handwired/obuwunkunubi/spaget/config.h b/keyboards/handwired/obuwunkunubi/spaget/config.h index 7743cd6cd60d..6a7baeba3380 100644 --- a/keyboards/handwired/obuwunkunubi/spaget/config.h +++ b/keyboards/handwired/obuwunkunubi/spaget/config.h @@ -32,10 +32,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* Define encoder pins */ -#define ENCODERS_PAD_A { F5, F7 } // 1a, 2a -#define ENCODERS_PAD_B { F4, F6 } // 1b, 2b - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/obuwunkunubi/spaget/info.json b/keyboards/handwired/obuwunkunubi/spaget/info.json index ed635d02089a..8a205c67945b 100644 --- a/keyboards/handwired/obuwunkunubi/spaget/info.json +++ b/keyboards/handwired/obuwunkunubi/spaget/info.json @@ -8,6 +8,12 @@ "pid": "0x6969", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"}, + {"pin_a": "F7", "pin_b": "F6"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/handwired/pill60/config.h b/keyboards/handwired/pill60/config.h index 1544eb0e1989..d978dbeb3e23 100644 --- a/keyboards/handwired/pill60/config.h +++ b/keyboards/handwired/pill60/config.h @@ -23,10 +23,3 @@ #define BACKLIGHT_PWM_DRIVER PWMD5 #define BACKLIGHT_PWM_CHANNEL 1 #define BACKLIGHT_LEVELS 5 - -/* Encoder */ -#define ENCODERS_PAD_A \ - { B9 } -#define ENCODERS_PAD_B \ - { B8 } -#define ENCODER_RESOLUTION 2 diff --git a/keyboards/handwired/pill60/info.json b/keyboards/handwired/pill60/info.json index bc92cf758560..c45b71eb1d8c 100644 --- a/keyboards/handwired/pill60/info.json +++ b/keyboards/handwired/pill60/info.json @@ -8,6 +8,11 @@ "pid": "0x5444", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B9", "pin_b": "B8", "resolution": 2} + ] + }, "debounce": 1, "layouts": { "LAYOUT": { diff --git a/keyboards/handwired/prkl30/feather/config.h b/keyboards/handwired/prkl30/feather/config.h index afa692b47605..a1b7295e324f 100644 --- a/keyboards/handwired/prkl30/feather/config.h +++ b/keyboards/handwired/prkl30/feather/config.h @@ -20,8 +20,6 @@ #define MATRIX_COL_PINS { D3, D1, B7, D6, C7, B6, B5, D7, C6, D0} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { F7 } -#define ENCODERS_PAD_B { F6 } /* RGB Light Configuration */ diff --git a/keyboards/handwired/prkl30/feather/info.json b/keyboards/handwired/prkl30/feather/info.json new file mode 100644 index 000000000000..8078ee048147 --- /dev/null +++ b/keyboards/handwired/prkl30/feather/info.json @@ -0,0 +1,7 @@ +{ + "encoder": { + "rotary": [ + {"pin_a": "F7", "pin_b": "F6"} + ] + } +} diff --git a/keyboards/handwired/prkl30/promicro/config.h b/keyboards/handwired/prkl30/promicro/config.h index 59b6cc84d23c..c3767088c793 100644 --- a/keyboards/handwired/prkl30/promicro/config.h +++ b/keyboards/handwired/prkl30/promicro/config.h @@ -20,8 +20,6 @@ #define MATRIX_COL_PINS { B4, B5, F6, F5, F4, F7, B1, B3, B2, B6} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } /* RGB Light Configuration */ diff --git a/keyboards/handwired/prkl30/promicro/info.json b/keyboards/handwired/prkl30/promicro/info.json new file mode 100644 index 000000000000..a7ca847765be --- /dev/null +++ b/keyboards/handwired/prkl30/promicro/info.json @@ -0,0 +1,7 @@ +{ + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2"} + ] + } +} \ No newline at end of file diff --git a/keyboards/handwired/snatchpad/config.h b/keyboards/handwired/snatchpad/config.h index 592f643435b4..57d303a983ff 100644 --- a/keyboards/handwired/snatchpad/config.h +++ b/keyboards/handwired/snatchpad/config.h @@ -20,10 +20,6 @@ /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Rotary encoder options */ -#define ENCODERS_PAD_A { D3, D0 } -#define ENCODERS_PAD_B { D2, D1 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/handwired/snatchpad/info.json b/keyboards/handwired/snatchpad/info.json index da0221f4741c..a86091abfdb4 100644 --- a/keyboards/handwired/snatchpad/info.json +++ b/keyboards/handwired/snatchpad/info.json @@ -8,6 +8,12 @@ "pid": "0x7370", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2"}, + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/handwired/swiftrax/bumblebee/config.h b/keyboards/handwired/swiftrax/bumblebee/config.h index f18b0fab89cf..c10291a82af8 100644 --- a/keyboards/handwired/swiftrax/bumblebee/config.h +++ b/keyboards/handwired/swiftrax/bumblebee/config.h @@ -25,10 +25,6 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL -/* Encoder */ -#define ENCODERS_PAD_A { C6 } -#define ENCODERS_PAD_B { B6 } - /* RGB Indicators */ #define RGB_DI_PIN E6 #define RGBLED_NUM 3 diff --git a/keyboards/handwired/swiftrax/bumblebee/info.json b/keyboards/handwired/swiftrax/bumblebee/info.json index 887fc697af68..2147a556c2d7 100644 --- a/keyboards/handwired/swiftrax/bumblebee/info.json +++ b/keyboards/handwired/swiftrax/bumblebee/info.json @@ -8,6 +8,11 @@ "pid": "0xE881", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "B6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/handwired/swiftrax/digicarp65/config.h b/keyboards/handwired/swiftrax/digicarp65/config.h index 6618b9fa8396..80b735d0d8af 100644 --- a/keyboards/handwired/swiftrax/digicarp65/config.h +++ b/keyboards/handwired/swiftrax/digicarp65/config.h @@ -25,6 +25,3 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B7 } diff --git a/keyboards/handwired/swiftrax/digicarp65/info.json b/keyboards/handwired/swiftrax/digicarp65/info.json index aba6fbd54d66..2eef10575635 100644 --- a/keyboards/handwired/swiftrax/digicarp65/info.json +++ b/keyboards/handwired/swiftrax/digicarp65/info.json @@ -8,6 +8,11 @@ "pid": "0xE7F1", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["65_ansi", "65_ansi_split_bs", "65_iso", "65_iso_split_bs"], diff --git a/keyboards/handwired/swiftrax/joypad/config.h b/keyboards/handwired/swiftrax/joypad/config.h index 45d0d0bb700c..2f54bc0c4e51 100644 --- a/keyboards/handwired/swiftrax/joypad/config.h +++ b/keyboards/handwired/swiftrax/joypad/config.h @@ -23,9 +23,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C6, B3, B0, B1, D6, D5 } #define MATRIX_COL_PINS { C7, B4, D0, C2 } -#define ENCODERS_PAD_A { C5 } -#define ENCODERS_PAD_B { C4 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/swiftrax/joypad/info.json b/keyboards/handwired/swiftrax/joypad/info.json index 9b3f094e85ca..bef5225bcd04 100644 --- a/keyboards/handwired/swiftrax/joypad/info.json +++ b/keyboards/handwired/swiftrax/joypad/info.json @@ -8,6 +8,11 @@ "pid": "0xEA68", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C5", "pin_b": "C4"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/handwired/swiftrax/pandamic/config.h b/keyboards/handwired/swiftrax/pandamic/config.h index b802e4782a8f..77daa76c24ab 100644 --- a/keyboards/handwired/swiftrax/pandamic/config.h +++ b/keyboards/handwired/swiftrax/pandamic/config.h @@ -23,10 +23,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D1, D2, B5, B7, D3, D5, D6, D4, D7, B4 } #define MATRIX_COL_PINS { B6, C6, C7, F7, F6, F5, F4, F1, F0, D0 } -#define ENCODERS_PAD_A { E6 } -#define ENCODERS_PAD_B { B0 } - - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/handwired/swiftrax/pandamic/info.json b/keyboards/handwired/swiftrax/pandamic/info.json index b5d0ebd1ba5d..60fe2886f5fe 100644 --- a/keyboards/handwired/swiftrax/pandamic/info.json +++ b/keyboards/handwired/swiftrax/pandamic/info.json @@ -8,6 +8,11 @@ "pid": "0xEB0E", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E6", "pin_b": "B0"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/handwired/swiftrax/walter/config.h b/keyboards/handwired/swiftrax/walter/config.h index d58a3cbfb426..7bfee265ab68 100644 --- a/keyboards/handwired/swiftrax/walter/config.h +++ b/keyboards/handwired/swiftrax/walter/config.h @@ -26,9 +26,6 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B7 } - #define RGB_DI_PIN E6 #define RGBLED_NUM 24 #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/handwired/swiftrax/walter/info.json b/keyboards/handwired/swiftrax/walter/info.json index 675da09c9ca7..88da47f36b8e 100644 --- a/keyboards/handwired/swiftrax/walter/info.json +++ b/keyboards/handwired/swiftrax/walter/info.json @@ -8,6 +8,11 @@ "pid": "0xE964", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h index e4856c4eecb0..c52610e9d3d1 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h @@ -38,10 +38,5 @@ along with this program. If not, see . #define EE_HANDS -#define ENCODERS_PAD_A \ - { D5 } -#define ENCODERS_PAD_B \ - { C7 } - /* PMW33XX Settings */ #define PMW33XX_CS_PIN B6 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/info.json b/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/info.json index 4fcfeed92188..dabab602ddb9 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/info.json +++ b/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/info.json @@ -1,5 +1,10 @@ { "keyboard_name": "Tractyl Manuform (5x6) Elite-C", + "encoder": { + "rotary": [ + {"pin_a": "D5", "pin_b": "C7"} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h index f3f3fb7e22fc..d10cb0bd8bbe 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h @@ -70,12 +70,6 @@ along with this program. If not, see . #define I2C1_SDA_PAL_MODE 4 #define I2C1_CLOCK_SPEED 400000 -/* encoder config */ -#define ENCODERS_PAD_A \ - { A7 } -#define ENCODERS_PAD_B \ - { A8 } - /* spi config for eeprom and pmw3360 sensor */ #define SPI_DRIVER SPID2 #define SPI_SCK_PIN B13 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/info.json b/keyboards/handwired/tractyl_manuform/5x6_right/f303/info.json index 3ad29d36b8f1..bed70941bfa0 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/info.json +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f303/info.json @@ -1,5 +1,10 @@ { "keyboard_name": "Tractyl Manuform (5x6) Proton-C", + "encoder": { + "rotary": [ + {"pin_a": "A7", "pin_b": "A8"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu" } diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h index e93e70f569bc..227863aaa5be 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h @@ -76,12 +76,6 @@ along with this program. If not, see . #define I2C1_CLOCK_SPEED 400000 #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9 -/* encoder config */ -#define ENCODERS_PAD_A \ - { A13 } -#define ENCODERS_PAD_B \ - { A14 } - /* spi config for eeprom and pmw3360 sensor */ #define SPI_DRIVER SPID1 #define SPI_SCK_PIN A5 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/info.json b/keyboards/handwired/tractyl_manuform/5x6_right/f411/info.json index 9b81dc18ebb4..0791e50ebf89 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/info.json +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/info.json @@ -1,5 +1,10 @@ { "keyboard_name": "Tractyl Manuform (5x6) BlackPill", + "encoder": { + "rotary": [ + {"pin_a": "A13", "pin_b": "A14"} + ] + }, "processor": "STM32F411", "bootloader": "stm32-dfu", "board": "BLACKPILL_STM32_F411" diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h index cae5b7fc14d7..51ff0d31239f 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h @@ -42,10 +42,5 @@ along with this program. If not, see . #define EE_HANDS -#define ENCODERS_PAD_A \ - { D5 } -#define ENCODERS_PAD_B \ - { D4 } - /* PMW33XX Settings */ #define PMW33XX_CS_PIN B0 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/info.json b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/info.json index a7fb36c71e60..7f60ae0edc52 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/info.json +++ b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/info.json @@ -1,5 +1,10 @@ { "keyboard_name": "Tractyl Manuform (5x6) Teensy 2.0++", + "encoder": { + "rotary": [ + {"pin_a": "D5", "pin_b": "D4"} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/handwired/uthol/rev3/config.h b/keyboards/handwired/uthol/rev3/config.h index dff88fb7c6d4..1e6b532e2af4 100644 --- a/keyboards/handwired/uthol/rev3/config.h +++ b/keyboards/handwired/uthol/rev3/config.h @@ -25,14 +25,6 @@ #define MATRIX_ROW_PINS \ { A4, A3, A2, A1, A0 } - -// Encoder config -#define ENCODERS_PAD_A \ - { C15 } -#define ENCODERS_PAD_B \ - { C14 } -#define ENCODER_RESOLUTION 2 - // OLED config #define OLED_DISPLAY_128X64 #define OLED_DISPLAY_WIDTH 128 diff --git a/keyboards/handwired/uthol/rev3/info.json b/keyboards/handwired/uthol/rev3/info.json index d95bbc9bca29..b5d099b27a09 100644 --- a/keyboards/handwired/uthol/rev3/info.json +++ b/keyboards/handwired/uthol/rev3/info.json @@ -3,6 +3,11 @@ "usb": { "device_version": "0.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "C15", "pin_b": "C14", "resolution": 2} + ] + }, "processor": "STM32F401", "bootloader": "stm32-dfu", "board": "BLACKPILL_STM32_F401" From edd3f7336cebc0d63a18432967ff5d64d7755905 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:34:11 +1100 Subject: [PATCH 12/31] Move encoder config to info.json, I --- keyboards/io_mini1800/config.h | 3 --- keyboards/io_mini1800/info.json | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/keyboards/io_mini1800/config.h b/keyboards/io_mini1800/config.h index 32f4e0e49bed..95251ca8f87e 100644 --- a/keyboards/io_mini1800/config.h +++ b/keyboards/io_mini1800/config.h @@ -19,6 +19,3 @@ /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW - -#define ENCODERS_PAD_A { B0 } -#define ENCODERS_PAD_B { B1 } diff --git a/keyboards/io_mini1800/info.json b/keyboards/io_mini1800/info.json index bdc04f17166e..05b346d793f6 100644 --- a/keyboards/io_mini1800/info.json +++ b/keyboards/io_mini1800/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { From d31f9090c5e38b1575d8c694b50e6a3774b8281a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:34:19 +1100 Subject: [PATCH 13/31] Move encoder config to info.json, J --- keyboards/jagdpietr/drakon/config.h | 3 --- keyboards/jagdpietr/drakon/info.json | 5 +++++ keyboards/jkeys_design/gentleman65/config.h | 3 --- keyboards/jkeys_design/gentleman65/info.json | 5 +++++ keyboards/jkeys_design/gentleman65_se_s/config.h | 3 --- keyboards/jkeys_design/gentleman65_se_s/info.json | 5 +++++ keyboards/jones/v03/config.h | 4 ---- keyboards/jones/v03/info.json | 6 ++++++ keyboards/jones/v03_1/config.h | 4 ---- keyboards/jones/v03_1/info.json | 6 ++++++ keyboards/jones/v1/config.h | 4 ---- keyboards/jones/v1/info.json | 6 ++++++ 12 files changed, 33 insertions(+), 21 deletions(-) diff --git a/keyboards/jagdpietr/drakon/config.h b/keyboards/jagdpietr/drakon/config.h index dc4f83bc3214..163236c90c21 100644 --- a/keyboards/jagdpietr/drakon/config.h +++ b/keyboards/jagdpietr/drakon/config.h @@ -34,9 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { F0 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/jagdpietr/drakon/info.json b/keyboards/jagdpietr/drakon/info.json index d29849d0c641..3aab78919901 100644 --- a/keyboards/jagdpietr/drakon/info.json +++ b/keyboards/jagdpietr/drakon/info.json @@ -8,6 +8,11 @@ "pid": "0x7776", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "F0"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/jkeys_design/gentleman65/config.h b/keyboards/jkeys_design/gentleman65/config.h index 0b6f74b29cc8..f8280340e825 100644 --- a/keyboards/jkeys_design/gentleman65/config.h +++ b/keyboards/jkeys_design/gentleman65/config.h @@ -39,7 +39,4 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define ENCODERS_PAD_A { F6 } -#define ENCODERS_PAD_B { F5 } - #define RGB_MATRIX_LED_COUNT 14 diff --git a/keyboards/jkeys_design/gentleman65/info.json b/keyboards/jkeys_design/gentleman65/info.json index 51a34f460e42..fff5b9b75299 100644 --- a/keyboards/jkeys_design/gentleman65/info.json +++ b/keyboards/jkeys_design/gentleman65/info.json @@ -8,6 +8,11 @@ "pid": "0x2020", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F5"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/jkeys_design/gentleman65_se_s/config.h b/keyboards/jkeys_design/gentleman65_se_s/config.h index b3b5daf5ad09..c80b64ef10de 100644 --- a/keyboards/jkeys_design/gentleman65_se_s/config.h +++ b/keyboards/jkeys_design/gentleman65_se_s/config.h @@ -39,7 +39,4 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define ENCODERS_PAD_A { B0 } -#define ENCODERS_PAD_B { B1 } - #define RGB_MATRIX_LED_COUNT 14 diff --git a/keyboards/jkeys_design/gentleman65_se_s/info.json b/keyboards/jkeys_design/gentleman65_se_s/info.json index b4acdb13929c..2415eb5c1804 100644 --- a/keyboards/jkeys_design/gentleman65_se_s/info.json +++ b/keyboards/jkeys_design/gentleman65_se_s/info.json @@ -8,6 +8,11 @@ "pid": "0x2322", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/jones/v03/config.h b/keyboards/jones/v03/config.h index 5031eb942c95..fc1ae1ff7743 100644 --- a/keyboards/jones/v03/config.h +++ b/keyboards/jones/v03/config.h @@ -41,10 +41,6 @@ along with this program. If not, see . // No need to define DIODE_DIRECTION for Jones' custom Round-Robin matrix. //#define DIODE_DIRECTION COL2ROW -/* Rotary Encoder */ -#define ENCODERS_PAD_A { F6, B3 } -#define ENCODERS_PAD_B { F7, B2 } - /* Audio */ #ifdef AUDIO_ENABLE #define AUDIO_PIN C6 diff --git a/keyboards/jones/v03/info.json b/keyboards/jones/v03/info.json index 996509d50476..388c0fb9efd5 100644 --- a/keyboards/jones/v03/info.json +++ b/keyboards/jones/v03/info.json @@ -8,6 +8,12 @@ "pid": "0x175A", "device_version": "0.3.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F7"}, + {"pin_a": "B3", "pin_b": "B2"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/jones/v03_1/config.h b/keyboards/jones/v03_1/config.h index 1a285f2b6a6f..548b98e67574 100644 --- a/keyboards/jones/v03_1/config.h +++ b/keyboards/jones/v03_1/config.h @@ -41,10 +41,6 @@ along with this program. If not, see . // No need to define DIODE_DIRECTION for Jones' custom Round-Robin matrix. //#define DIODE_DIRECTION COL2ROW -/* Rotary Encoder */ -#define ENCODERS_PAD_A { F6, B3 } -#define ENCODERS_PAD_B { F7, B2 } - /* Audio */ #ifdef AUDIO_ENABLE #define AUDIO_PIN C6 diff --git a/keyboards/jones/v03_1/info.json b/keyboards/jones/v03_1/info.json index 0bde4d3b5b2a..45e7b8022f2d 100644 --- a/keyboards/jones/v03_1/info.json +++ b/keyboards/jones/v03_1/info.json @@ -8,6 +8,12 @@ "pid": "0x175A", "device_version": "0.3.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F7"}, + {"pin_a": "B3", "pin_b": "B2"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/jones/v1/config.h b/keyboards/jones/v1/config.h index 7e02d8c8ef25..1936d5d2567e 100644 --- a/keyboards/jones/v1/config.h +++ b/keyboards/jones/v1/config.h @@ -24,10 +24,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW -/* Rotary Encoder */ -#define ENCODERS_PAD_A { F5, D2 } -#define ENCODERS_PAD_B { F4, D3 } - /* Audio */ #ifdef AUDIO_ENABLE #define AUDIO_PIN C6 diff --git a/keyboards/jones/v1/info.json b/keyboards/jones/v1/info.json index 8e03e57950e4..37f0b70087f0 100644 --- a/keyboards/jones/v1/info.json +++ b/keyboards/jones/v1/info.json @@ -8,6 +8,12 @@ "pid": "0x175A", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"}, + {"pin_a": "D2", "pin_b": "D3"} + ] + }, "bootmagic": { "matrix": [0, 9] }, From 8b475971b8ef1857c9f3ae40ded8feacec877e0a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:34:44 +1100 Subject: [PATCH 14/31] Move encoder config to info.json, K --- keyboards/kabedon/kabedon98e/config.h | 3 --- keyboards/kabedon/kabedon98e/info.json | 6 ++++++ keyboards/kapcave/arya/config.h | 4 ---- keyboards/kapcave/arya/info.json | 7 +++++++ keyboards/keebio/bamfk1/config.h | 2 -- keyboards/keebio/bamfk1/info.json | 6 ++++++ keyboards/keebio/bdn9/rev1/config.h | 3 --- keyboards/keebio/bdn9/rev1/info.json | 7 +++++++ keyboards/keebio/bdn9/rev2/config.h | 3 --- keyboards/keebio/bdn9/rev2/info.json | 7 +++++++ keyboards/keebio/dsp40/rev1/config.h | 3 +-- keyboards/keebio/dsp40/rev1/info.json | 5 +++++ keyboards/keebio/foldkb/rev1/config.h | 2 -- keyboards/keebio/foldkb/rev1/info.json | 5 +++++ keyboards/keebio/iris/rev3/config.h | 3 --- keyboards/keebio/iris/rev3/info.json | 5 +++++ keyboards/keebio/iris/rev4/config.h | 5 ----- keyboards/keebio/iris/rev4/info.json | 14 ++++++++++++- keyboards/keebio/iris/rev5/config.h | 5 ----- keyboards/keebio/iris/rev5/info.json | 14 ++++++++++++- keyboards/keebio/iris/rev6/config.h | 5 ----- keyboards/keebio/iris/rev6/info.json | 5 +++++ keyboards/keebio/iris/rev6a/config.h | 5 ----- keyboards/keebio/iris/rev6a/info.json | 5 +++++ keyboards/keebio/iris/rev6b/config.h | 5 ----- keyboards/keebio/iris/rev6b/info.json | 5 +++++ keyboards/keebio/iris/rev7/config.h | 5 ----- keyboards/keebio/iris/rev7/info.json | 6 ++++++ keyboards/keebio/kbo5000/rev1/config.h | 4 ---- keyboards/keebio/kbo5000/rev1/info.json | 16 ++++++++++++++- keyboards/keebio/quefrency/rev2/config.h | 4 ---- keyboards/keebio/quefrency/rev2/info.json | 14 ++++++++++++- keyboards/keebio/quefrency/rev3/config.h | 4 ---- keyboards/keebio/quefrency/rev3/info.json | 14 ++++++++++++- keyboards/keebio/quefrency/rev4/config.h | 4 ---- keyboards/keebio/quefrency/rev4/info.json | 14 ++++++++++++- keyboards/keebio/quefrency/rev5/config.h | 4 ---- keyboards/keebio/quefrency/rev5/info.json | 14 ++++++++++++- keyboards/keebio/stick/config.h | 3 --- keyboards/keebio/stick/info.json | 6 ++++++ keyboards/keebsforall/coarse60/config.h | 4 ---- keyboards/keebsforall/coarse60/info.json | 5 +++++ keyboards/keebsforall/freebirdnp/pro/config.h | 4 ---- .../keebsforall/freebirdnp/pro/info.json | 5 +++++ keyboards/keybage/radpad/config.h | 5 ----- keyboards/keybage/radpad/info.json | 6 ++++++ keyboards/keycapsss/kimiko/rev1/config.h | 7 ------- keyboards/keycapsss/kimiko/rev1/info.json | 5 +++++ keyboards/keycapsss/plaid_pad/rev1/config.h | 3 --- keyboards/keycapsss/plaid_pad/rev1/info.json | 8 +++++++- keyboards/keycapsss/plaid_pad/rev2/config.h | 3 --- keyboards/keycapsss/plaid_pad/rev2/info.json | 8 ++++++++ keyboards/keycapsss/plaid_pad/rev3/config.h | 20 ------------------- keyboards/keycapsss/plaid_pad/rev3/info.json | 10 +++++++++- keyboards/keychron/q0/rev_0131/config.h | 2 -- keyboards/keychron/q0/rev_0131/info.json | 5 +++++ keyboards/keychron/q1/ansi_encoder/config.h | 4 ---- keyboards/keychron/q1/ansi_encoder/info.json | 5 +++++ keyboards/keychron/q1/iso_encoder/config.h | 4 ---- keyboards/keychron/q1/iso_encoder/info.json | 5 +++++ keyboards/keychron/q10/ansi_encoder/config.h | 2 -- keyboards/keychron/q10/ansi_encoder/info.json | 5 +++++ keyboards/keychron/q10/iso_encoder/config.h | 2 -- keyboards/keychron/q10/iso_encoder/info.json | 5 +++++ keyboards/keychron/q2/ansi_encoder/config.h | 2 -- keyboards/keychron/q2/ansi_encoder/info.json | 5 +++++ keyboards/keychron/q2/iso_encoder/config.h | 2 -- keyboards/keychron/q2/iso_encoder/info.json | 5 +++++ keyboards/keychron/q2/jis_encoder/config.h | 2 -- keyboards/keychron/q2/jis_encoder/info.json | 5 +++++ keyboards/keychron/q3/ansi_encoder/config.h | 2 -- keyboards/keychron/q3/ansi_encoder/info.json | 5 +++++ keyboards/keychron/q3/iso_encoder/config.h | 2 -- keyboards/keychron/q3/iso_encoder/info.json | 5 +++++ keyboards/keychron/q3/jis_encoder/config.h | 2 -- keyboards/keychron/q3/jis_encoder/info.json | 5 +++++ keyboards/keychron/q5/ansi_encoder/config.h | 2 -- keyboards/keychron/q5/ansi_encoder/info.json | 5 +++++ keyboards/keychron/q5/iso_encoder/config.h | 2 -- keyboards/keychron/q5/iso_encoder/info.json | 5 +++++ keyboards/keychron/q6/ansi_encoder/config.h | 2 -- keyboards/keychron/q6/ansi_encoder/info.json | 5 +++++ keyboards/keychron/q6/iso_encoder/config.h | 2 -- keyboards/keychron/q6/iso_encoder/info.json | 5 +++++ keyboards/keychron/q65/ansi_encoder/config.h | 2 -- keyboards/keychron/q65/ansi_encoder/info.json | 5 +++++ keyboards/keychron/q8/ansi_encoder/config.h | 2 -- keyboards/keychron/q8/ansi_encoder/info.json | 5 +++++ keyboards/keychron/q8/iso_encoder/config.h | 2 -- keyboards/keychron/q8/iso_encoder/info.json | 5 +++++ keyboards/keychron/q9/ansi_encoder/config.h | 2 -- keyboards/keychron/q9/ansi_encoder/info.json | 5 +++++ keyboards/keychron/q9/iso_encoder/config.h | 2 -- keyboards/keychron/q9/iso_encoder/info.json | 5 +++++ keyboards/keychron/v1/ansi_encoder/config.h | 2 -- keyboards/keychron/v1/ansi_encoder/info.json | 5 +++++ keyboards/keychron/v1/iso_encoder/config.h | 2 -- keyboards/keychron/v1/iso_encoder/info.json | 5 +++++ keyboards/keychron/v1/jis_encoder/config.h | 2 -- keyboards/keychron/v1/jis_encoder/info.json | 5 +++++ keyboards/keychron/v10/ansi_encoder/config.h | 2 -- keyboards/keychron/v10/ansi_encoder/info.json | 5 +++++ keyboards/keychron/v10/iso_encoder/config.h | 2 -- keyboards/keychron/v10/iso_encoder/info.json | 5 +++++ keyboards/keychron/v2/ansi_encoder/config.h | 2 -- keyboards/keychron/v2/ansi_encoder/info.json | 5 +++++ keyboards/keychron/v2/iso_encoder/config.h | 2 -- keyboards/keychron/v2/iso_encoder/info.json | 5 +++++ keyboards/keychron/v2/jis_encoder/config.h | 2 -- keyboards/keychron/v2/jis_encoder/info.json | 5 +++++ keyboards/keychron/v3/ansi_encoder/config.h | 2 -- keyboards/keychron/v3/ansi_encoder/info.json | 5 +++++ keyboards/keychron/v3/iso_encoder/config.h | 2 -- keyboards/keychron/v3/iso_encoder/info.json | 5 +++++ keyboards/keychron/v3/jis_encoder/config.h | 2 -- keyboards/keychron/v3/jis_encoder/info.json | 5 +++++ keyboards/keychron/v5/ansi_encoder/config.h | 2 -- keyboards/keychron/v5/ansi_encoder/info.json | 5 +++++ keyboards/keychron/v5/iso_encoder/config.h | 2 -- keyboards/keychron/v5/iso_encoder/info.json | 5 +++++ keyboards/keychron/v6/ansi_encoder/config.h | 2 -- keyboards/keychron/v6/ansi_encoder/info.json | 5 +++++ keyboards/keychron/v6/iso_encoder/config.h | 2 -- keyboards/keychron/v6/iso_encoder/info.json | 5 +++++ keyboards/keychron/v8/ansi_encoder/config.h | 2 -- keyboards/keychron/v8/ansi_encoder/info.json | 5 +++++ keyboards/keychron/v8/iso_encoder/config.h | 2 -- keyboards/keychron/v8/iso_encoder/info.json | 5 +++++ keyboards/keyhive/absinthe/config.h | 3 --- keyboards/keyhive/absinthe/info.json | 5 +++++ keyboards/keyhive/uno/rev2/config.h | 4 ---- keyboards/keyhive/uno/rev2/info.json | 5 +++++ keyboards/keyprez/bison/config.h | 5 ----- keyboards/keyprez/bison/info.json | 14 ++++++++++++- keyboards/keyprez/corgi/config.h | 3 --- keyboards/keyprez/corgi/info.json | 5 +++++ keyboards/keyprez/rhino/config.h | 3 --- keyboards/keyprez/rhino/info.json | 5 +++++ keyboards/keyprez/unicorn/config.h | 5 ----- keyboards/keyprez/unicorn/info.json | 5 +++++ keyboards/keysofkings/twokey/config.h | 5 ----- keyboards/keysofkings/twokey/info.json | 5 +++++ .../keystonecaps/gameroyadvance/config.h | 4 ---- .../keystonecaps/gameroyadvance/info.json | 14 ++++++++++++- keyboards/kikoslab/ellora65/config.h | 3 --- keyboards/kikoslab/ellora65/info.json | 5 +++++ keyboards/kikoslab/kl90/config.h | 3 --- keyboards/kikoslab/kl90/info.json | 6 ++++++ keyboards/kingly_keys/ave/config.h | 4 ---- keyboards/kingly_keys/ave/ortho/info.json | 5 +++++ keyboards/kingly_keys/ave/staggered/info.json | 5 +++++ keyboards/kingly_keys/romac_plus/config.h | 3 --- keyboards/kingly_keys/romac_plus/info.json | 5 +++++ keyboards/kingly_keys/ropro/config.h | 4 ---- keyboards/kingly_keys/ropro/info.json | 5 +++++ keyboards/kingly_keys/soap/config.h | 4 ---- keyboards/kingly_keys/soap/info.json | 5 +++++ keyboards/kiwikeebs/macro/config.h | 3 --- keyboards/kiwikeebs/macro/info.json | 5 +++++ keyboards/kiwikeebs/macro_v2/config.h | 3 --- keyboards/kiwikeebs/macro_v2/info.json | 5 +++++ keyboards/kiwikey/borderland/config.h | 3 --- keyboards/kiwikey/borderland/info.json | 5 +++++ keyboards/knobgoblin/config.h | 3 --- keyboards/knobgoblin/info.json | 6 ++++++ .../kprepublic/bm60hsrgb_ec/rev1/config.h | 5 ----- .../kprepublic/bm60hsrgb_ec/rev1/info.json | 5 +++++ .../kprepublic/bm60hsrgb_ec/rev2/config.h | 5 ----- .../kprepublic/bm60hsrgb_ec/rev2/info.json | 5 +++++ 169 files changed, 522 insertions(+), 285 deletions(-) delete mode 100644 keyboards/keycapsss/plaid_pad/rev3/config.h diff --git a/keyboards/kabedon/kabedon98e/config.h b/keyboards/kabedon/kabedon98e/config.h index 7edabd4292d2..5def60fa817d 100644 --- a/keyboards/kabedon/kabedon98e/config.h +++ b/keyboards/kabedon/kabedon98e/config.h @@ -46,9 +46,6 @@ #define LOCKING_RESYNC_ENABLE #define ENCODERS 2 -#define ENCODERS_PAD_A { B3,A14 } -#define ENCODERS_PAD_B { B5,A15 } - #define ENCODERS_CW_KEY { { 0, 0 },{ 2, 0 } } #define ENCODERS_CCW_KEY { { 6, 0 },{ 8, 0 } } diff --git a/keyboards/kabedon/kabedon98e/info.json b/keyboards/kabedon/kabedon98e/info.json index 1ec2ed9ac5fe..def8f7261252 100644 --- a/keyboards/kabedon/kabedon98e/info.json +++ b/keyboards/kabedon/kabedon98e/info.json @@ -8,6 +8,12 @@ "pid": "0x3935", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B5"}, + {"pin_a": "A14", "pin_b": "A15"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/kapcave/arya/config.h b/keyboards/kapcave/arya/config.h index 5f60e8fec5ed..dd197f233853 100644 --- a/keyboards/kapcave/arya/config.h +++ b/keyboards/kapcave/arya/config.h @@ -26,10 +26,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS_PAD_A { B12, B14, C15 } -#define ENCODERS_PAD_B { B13, B15, C14 } - -#define ENCODER_RESOLUTION 2 #define TAP_CODE_DELAY 25 #define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/kapcave/arya/info.json b/keyboards/kapcave/arya/info.json index 9ded56205af6..54a1513f90d2 100644 --- a/keyboards/kapcave/arya/info.json +++ b/keyboards/kapcave/arya/info.json @@ -8,6 +8,13 @@ "pid": "0x4152", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B12", "pin_b": "B13", "resolution": 2}, + {"pin_a": "B14", "pin_b": "B15", "resolution": 2}, + {"pin_a": "C15", "pin_b": "C14", "resolution": 2} + ] + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "community_layouts": ["alice_split_bs"], diff --git a/keyboards/keebio/bamfk1/config.h b/keyboards/keebio/bamfk1/config.h index de8b594cec16..35b0f51098d6 100644 --- a/keyboards/keebio/bamfk1/config.h +++ b/keyboards/keebio/bamfk1/config.h @@ -8,8 +8,6 @@ # define STARTUP_SONG SONG(STARTUP_SOUND) #endif -#define ENCODERS_PAD_A { C7, D7 } -#define ENCODERS_PAD_B { B5, D4 } #define ENCODERS 2 #define ENCODERS_CW_KEY { { 1, 1 }, { 3, 1 } } #define ENCODERS_CCW_KEY { { 0, 1 }, { 2, 1 } } diff --git a/keyboards/keebio/bamfk1/info.json b/keyboards/keebio/bamfk1/info.json index c39cbd3ce0a6..c647eec5144a 100644 --- a/keyboards/keebio/bamfk1/info.json +++ b/keyboards/keebio/bamfk1/info.json @@ -8,6 +8,12 @@ "pid": "0x1111", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C7", "pin_b": "B5"}, + {"pin_a": "D7", "pin_b": "D4"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "matrix_pins": { diff --git a/keyboards/keebio/bdn9/rev1/config.h b/keyboards/keebio/bdn9/rev1/config.h index d34d9756f9cc..f9a6829c18e8 100644 --- a/keyboards/keebio/bdn9/rev1/config.h +++ b/keyboards/keebio/bdn9/rev1/config.h @@ -17,9 +17,6 @@ along with this program. If not, see . #pragma once -#define ENCODERS_PAD_A { D0, F6, B6 } -#define ENCODERS_PAD_B { D1, F5, F7 } - #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 7 diff --git a/keyboards/keebio/bdn9/rev1/info.json b/keyboards/keebio/bdn9/rev1/info.json index e5dea5026064..a09ea028d771 100644 --- a/keyboards/keebio/bdn9/rev1/info.json +++ b/keyboards/keebio/bdn9/rev1/info.json @@ -4,6 +4,13 @@ "pid": "0x1133", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"}, + {"pin_a": "F6", "pin_b": "F5"}, + {"pin_a": "B6", "pin_b": "F7"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/keebio/bdn9/rev2/config.h b/keyboards/keebio/bdn9/rev2/config.h index f30de7e1978b..ee2065f176ec 100644 --- a/keyboards/keebio/bdn9/rev2/config.h +++ b/keyboards/keebio/bdn9/rev2/config.h @@ -17,9 +17,6 @@ along with this program. If not, see . #pragma once -// Left, Right, Middle -#define ENCODERS_PAD_A { A8, B3, A10 } -#define ENCODERS_PAD_B { A4, A15, A9 } #define TAP_CODE_DELAY 10 #define RGB_DI_PIN B15 diff --git a/keyboards/keebio/bdn9/rev2/info.json b/keyboards/keebio/bdn9/rev2/info.json index 24eebef1a8f4..c23acbc27fab 100644 --- a/keyboards/keebio/bdn9/rev2/info.json +++ b/keyboards/keebio/bdn9/rev2/info.json @@ -4,6 +4,13 @@ "pid": "0x2133", "device_version": "2.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A8", "pin_b": "A4"}, + {"pin_a": "B3", "pin_b": "A15"}, + {"pin_a": "A10", "pin_b": "A9"} + ] + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "matrix_pins": { diff --git a/keyboards/keebio/dsp40/rev1/config.h b/keyboards/keebio/dsp40/rev1/config.h index 1ec02a68bee5..2050480e94c7 100644 --- a/keyboards/keebio/dsp40/rev1/config.h +++ b/keyboards/keebio/dsp40/rev1/config.h @@ -20,8 +20,7 @@ along with this program. If not, see . /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { B9, A9, A8, B15 } #define MATRIX_COL_PINS { B10, B2, A3, A4, B7, B6, A10, C13, C14, C15, F0, F1 } -#define ENCODERS_PAD_A { A1 } -#define ENCODERS_PAD_B { A2 } + #define TAP_CODE_DELAY 10 #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebio/dsp40/rev1/info.json b/keyboards/keebio/dsp40/rev1/info.json index f50ee33ed308..10886ca12823 100644 --- a/keyboards/keebio/dsp40/rev1/info.json +++ b/keyboards/keebio/dsp40/rev1/info.json @@ -8,6 +8,11 @@ "pid": "0x144C", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A1", "pin_b": "A2"} + ] + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keebio/foldkb/rev1/config.h b/keyboards/keebio/foldkb/rev1/config.h index 19fced2c36c2..ee32cd990702 100644 --- a/keyboards/keebio/foldkb/rev1/config.h +++ b/keyboards/keebio/foldkb/rev1/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B1, B2, C7, B4, D7 } #define MATRIX_COL_PINS { F4, F1, F0, B7, B3, D2, D3, D5 } #define SPLIT_HAND_PIN F7 -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F6 } #define BACKLIGHT_PIN B5 diff --git a/keyboards/keebio/foldkb/rev1/info.json b/keyboards/keebio/foldkb/rev1/info.json index ee3721bad4db..8b593155df48 100644 --- a/keyboards/keebio/foldkb/rev1/info.json +++ b/keyboards/keebio/foldkb/rev1/info.json @@ -8,6 +8,11 @@ "pid": "0x1258", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "split": { "soft_serial_pin": "D0" }, diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h index 17dd3d35e4cb..6c158039372c 100644 --- a/keyboards/keebio/iris/rev3/config.h +++ b/keyboards/keebio/iris/rev3/config.h @@ -22,9 +22,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F1, F4, F5, F6, D4, B4 } #define SPLIT_HAND_PIN F0 -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { B7 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebio/iris/rev3/info.json b/keyboards/keebio/iris/rev3/info.json index f930160d0f95..e80dc4a5e521 100644 --- a/keyboards/keebio/iris/rev3/info.json +++ b/keyboards/keebio/iris/rev3/info.json @@ -4,6 +4,11 @@ "pid": "0x3256", "device_version": "3.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B7"} + ] + }, "qmk_lufa_bootloader": { "esc_input": "D2", "esc_output": "F1", diff --git a/keyboards/keebio/iris/rev4/config.h b/keyboards/keebio/iris/rev4/config.h index 35d4d597216a..a80352c82273 100644 --- a/keyboards/keebio/iris/rev4/config.h +++ b/keyboards/keebio/iris/rev4/config.h @@ -24,11 +24,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS_RIGHT { D4, D7, D3, B7, F0, B3 } #define SPLIT_HAND_PIN D5 -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B3 } -#define ENCODERS_PAD_A_RIGHT { F7 } -#define ENCODERS_PAD_B_RIGHT { F6 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebio/iris/rev4/info.json b/keyboards/keebio/iris/rev4/info.json index 8288b2fdf44e..87396f37696f 100644 --- a/keyboards/keebio/iris/rev4/info.json +++ b/keyboards/keebio/iris/rev4/info.json @@ -4,6 +4,11 @@ "pid": "0x4256", "device_version": "4.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3"} + ] + }, "qmk_lufa_bootloader": { "esc_input": "B1", "esc_output": "F1", @@ -11,7 +16,14 @@ "speaker": "C6" }, "split": { - "soft_serial_pin": "D0" + "soft_serial_pin": "D0", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F7", "pin_b": "F6"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "qmk-dfu" diff --git a/keyboards/keebio/iris/rev5/config.h b/keyboards/keebio/iris/rev5/config.h index fcfe3b5b6851..ef4dd45ad24d 100644 --- a/keyboards/keebio/iris/rev5/config.h +++ b/keyboards/keebio/iris/rev5/config.h @@ -24,11 +24,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS_RIGHT { D4, D7, D3, B7, F0, B3 } #define SPLIT_HAND_PIN D5 -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B3 } -#define ENCODERS_PAD_A_RIGHT { F7 } -#define ENCODERS_PAD_B_RIGHT { F6 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebio/iris/rev5/info.json b/keyboards/keebio/iris/rev5/info.json index 11b8bed530dc..c944ccb18207 100644 --- a/keyboards/keebio/iris/rev5/info.json +++ b/keyboards/keebio/iris/rev5/info.json @@ -4,6 +4,11 @@ "pid": "0x5256", "device_version": "5.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3"} + ] + }, "qmk_lufa_bootloader": { "esc_input": "B1", "esc_output": "F1", @@ -11,7 +16,14 @@ "speaker": "C6" }, "split": { - "soft_serial_pin": "D0" + "soft_serial_pin": "D0", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F7", "pin_b": "F6"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "qmk-dfu" diff --git a/keyboards/keebio/iris/rev6/config.h b/keyboards/keebio/iris/rev6/config.h index a07aee024d15..0c6b1e38f8e0 100644 --- a/keyboards/keebio/iris/rev6/config.h +++ b/keyboards/keebio/iris/rev6/config.h @@ -24,11 +24,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS_RIGHT { D4, D6, D7, C7, F1, F4 } #define SPLIT_HAND_PIN D5 -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B2 } -#define ENCODERS_PAD_A_RIGHT { B3 } -#define ENCODERS_PAD_B_RIGHT { B2 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebio/iris/rev6/info.json b/keyboards/keebio/iris/rev6/info.json index 930cc7a34da2..8470624a310f 100644 --- a/keyboards/keebio/iris/rev6/info.json +++ b/keyboards/keebio/iris/rev6/info.json @@ -4,6 +4,11 @@ "pid": "0x6256", "device_version": "6.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2"} + ] + }, "split": { "soft_serial_pin": "D0" }, diff --git a/keyboards/keebio/iris/rev6a/config.h b/keyboards/keebio/iris/rev6a/config.h index b78a757344cb..dd05a6ec3be2 100644 --- a/keyboards/keebio/iris/rev6a/config.h +++ b/keyboards/keebio/iris/rev6a/config.h @@ -24,11 +24,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS_RIGHT { D4, D6, D7, C7, F1, F4 } #define SPLIT_HAND_PIN D5 -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B2 } -#define ENCODERS_PAD_A_RIGHT { B3 } -#define ENCODERS_PAD_B_RIGHT { B2 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebio/iris/rev6a/info.json b/keyboards/keebio/iris/rev6a/info.json index f03043a0e76a..027a79f512fc 100644 --- a/keyboards/keebio/iris/rev6a/info.json +++ b/keyboards/keebio/iris/rev6a/info.json @@ -4,6 +4,11 @@ "pid": "0x6356", "device_version": "6.1.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2"} + ] + }, "split": { "soft_serial_pin": "D0" }, diff --git a/keyboards/keebio/iris/rev6b/config.h b/keyboards/keebio/iris/rev6b/config.h index b78a757344cb..dd05a6ec3be2 100644 --- a/keyboards/keebio/iris/rev6b/config.h +++ b/keyboards/keebio/iris/rev6b/config.h @@ -24,11 +24,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS_RIGHT { D4, D6, D7, C7, F1, F4 } #define SPLIT_HAND_PIN D5 -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B2 } -#define ENCODERS_PAD_A_RIGHT { B3 } -#define ENCODERS_PAD_B_RIGHT { B2 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebio/iris/rev6b/info.json b/keyboards/keebio/iris/rev6b/info.json index 2fef279eb3a5..b8d1f076a411 100644 --- a/keyboards/keebio/iris/rev6b/info.json +++ b/keyboards/keebio/iris/rev6b/info.json @@ -4,6 +4,11 @@ "pid": "0x6456", "device_version": "6.2.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2"} + ] + }, "split": { "soft_serial_pin": "D0" }, diff --git a/keyboards/keebio/iris/rev7/config.h b/keyboards/keebio/iris/rev7/config.h index 112edec59294..906b65b0b2e8 100644 --- a/keyboards/keebio/iris/rev7/config.h +++ b/keyboards/keebio/iris/rev7/config.h @@ -24,11 +24,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS_RIGHT { D4, D6, D7, C7, F1, F4 } #define SPLIT_HAND_PIN D5 -#define ENCODERS_PAD_A { B3, F6 } -#define ENCODERS_PAD_B { B2, F7 } -#define ENCODERS_PAD_A_RIGHT { B3, F6 } -#define ENCODERS_PAD_B_RIGHT { B2, F7 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebio/iris/rev7/info.json b/keyboards/keebio/iris/rev7/info.json index b44059ee2404..086f8907a955 100644 --- a/keyboards/keebio/iris/rev7/info.json +++ b/keyboards/keebio/iris/rev7/info.json @@ -4,6 +4,12 @@ "pid": "0x7256", "device_version": "7.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2"}, + {"pin_a": "F6", "pin_b": "F7"} + ] + }, "split": { "soft_serial_pin": "D0" }, diff --git a/keyboards/keebio/kbo5000/rev1/config.h b/keyboards/keebio/kbo5000/rev1/config.h index 5705fe7c9a22..ecf97e0cc360 100644 --- a/keyboards/keebio/kbo5000/rev1/config.h +++ b/keyboards/keebio/kbo5000/rev1/config.h @@ -25,10 +25,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS_RIGHT { B3, B2, B6, B4, D7, B0 } #define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, D5, D2, D3, B7, B1 } #define SPLIT_HAND_PIN F7 -#define ENCODERS_PAD_A { F5, NO_PIN } -#define ENCODERS_PAD_B { F6, NO_PIN } -#define ENCODERS_PAD_A_RIGHT { D6, C7 } -#define ENCODERS_PAD_B_RIGHT { D4, C6 } #define BACKLIGHT_PIN B5 #define CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/kbo5000/rev1/info.json b/keyboards/keebio/kbo5000/rev1/info.json index 54db6d97a516..35fae44cac03 100644 --- a/keyboards/keebio/kbo5000/rev1/info.json +++ b/keyboards/keebio/kbo5000/rev1/info.json @@ -8,8 +8,22 @@ "pid": "0x126A", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"}, + {"pin_a": null, "pin_b": null} + ] + }, "split": { - "soft_serial_pin": "D0" + "soft_serial_pin": "D0", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "D6", "pin_b": "C7"}, + {"pin_a": "D4", "pin_b": "C6"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/keebio/quefrency/rev2/config.h b/keyboards/keebio/quefrency/rev2/config.h index c9ffb474ca20..a7065d521b1e 100644 --- a/keyboards/keebio/quefrency/rev2/config.h +++ b/keyboards/keebio/quefrency/rev2/config.h @@ -25,10 +25,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS_RIGHT { B3, B2, B6, B4, D7 } #define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, D5, C7, D3, B7 } #define SPLIT_HAND_PIN F7 -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F6 } -#define ENCODERS_PAD_A_RIGHT { D6 } -#define ENCODERS_PAD_B_RIGHT { D4 } #define BACKLIGHT_PIN B5 #define CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/quefrency/rev2/info.json b/keyboards/keebio/quefrency/rev2/info.json index 36b4de113f6f..17c59d06671d 100644 --- a/keyboards/keebio/quefrency/rev2/info.json +++ b/keyboards/keebio/quefrency/rev2/info.json @@ -8,8 +8,20 @@ "pid": "0x2257", "device_version": "2.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "split": { - "soft_serial_pin": "D0" + "soft_serial_pin": "D0", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D4"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/keebio/quefrency/rev3/config.h b/keyboards/keebio/quefrency/rev3/config.h index c9ffb474ca20..a7065d521b1e 100644 --- a/keyboards/keebio/quefrency/rev3/config.h +++ b/keyboards/keebio/quefrency/rev3/config.h @@ -25,10 +25,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS_RIGHT { B3, B2, B6, B4, D7 } #define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, D5, C7, D3, B7 } #define SPLIT_HAND_PIN F7 -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F6 } -#define ENCODERS_PAD_A_RIGHT { D6 } -#define ENCODERS_PAD_B_RIGHT { D4 } #define BACKLIGHT_PIN B5 #define CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/quefrency/rev3/info.json b/keyboards/keebio/quefrency/rev3/info.json index b04687118286..1eba5c37637b 100644 --- a/keyboards/keebio/quefrency/rev3/info.json +++ b/keyboards/keebio/quefrency/rev3/info.json @@ -8,8 +8,20 @@ "pid": "0x3357", "device_version": "3.1.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "split": { - "soft_serial_pin": "D0" + "soft_serial_pin": "D0", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D4"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/keebio/quefrency/rev4/config.h b/keyboards/keebio/quefrency/rev4/config.h index ed29b07d323d..3292fbf30215 100644 --- a/keyboards/keebio/quefrency/rev4/config.h +++ b/keyboards/keebio/quefrency/rev4/config.h @@ -23,10 +23,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS_RIGHT { B3, B2, B6, B4, D7 } #define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, D5, C7, D3, B7 } #define SPLIT_HAND_PIN F7 -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F6 } -#define ENCODERS_PAD_A_RIGHT { D6 } -#define ENCODERS_PAD_B_RIGHT { D4 } /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keebio/quefrency/rev4/info.json b/keyboards/keebio/quefrency/rev4/info.json index 374335f2b4ec..de9a383d4fdd 100644 --- a/keyboards/keebio/quefrency/rev4/info.json +++ b/keyboards/keebio/quefrency/rev4/info.json @@ -8,8 +8,20 @@ "pid": "0x4357", "device_version": "4.1.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "split": { - "soft_serial_pin": "D0" + "soft_serial_pin": "D0", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D4"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/keebio/quefrency/rev5/config.h b/keyboards/keebio/quefrency/rev5/config.h index ed29b07d323d..3292fbf30215 100644 --- a/keyboards/keebio/quefrency/rev5/config.h +++ b/keyboards/keebio/quefrency/rev5/config.h @@ -23,10 +23,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS_RIGHT { B3, B2, B6, B4, D7 } #define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, D5, C7, D3, B7 } #define SPLIT_HAND_PIN F7 -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F6 } -#define ENCODERS_PAD_A_RIGHT { D6 } -#define ENCODERS_PAD_B_RIGHT { D4 } /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keebio/quefrency/rev5/info.json b/keyboards/keebio/quefrency/rev5/info.json index c2fdc5c149dc..422d9872585c 100644 --- a/keyboards/keebio/quefrency/rev5/info.json +++ b/keyboards/keebio/quefrency/rev5/info.json @@ -8,8 +8,20 @@ "pid": "0x5357", "device_version": "5.1.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "split": { - "soft_serial_pin": "D0" + "soft_serial_pin": "D0", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D4"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/keebio/stick/config.h b/keyboards/keebio/stick/config.h index 807383befc83..c4b27e4324a7 100644 --- a/keyboards/keebio/stick/config.h +++ b/keyboards/keebio/stick/config.h @@ -17,9 +17,6 @@ along with this program. If not, see . #pragma once -#define ENCODERS_PAD_A { D1, D4 } -#define ENCODERS_PAD_B { D0, C6 } - /* WS2812 RGB LED */ #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN diff --git a/keyboards/keebio/stick/info.json b/keyboards/keebio/stick/info.json index 268e56032da5..028332b5f4fb 100644 --- a/keyboards/keebio/stick/info.json +++ b/keyboards/keebio/stick/info.json @@ -8,6 +8,12 @@ "pid": "0x111C", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"}, + {"pin_a": "D4", "pin_b": "C6"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/keebsforall/coarse60/config.h b/keyboards/keebsforall/coarse60/config.h index cd4fb39ae237..0612a9cfb597 100644 --- a/keyboards/keebsforall/coarse60/config.h +++ b/keyboards/keebsforall/coarse60/config.h @@ -50,10 +50,6 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define ENCODERS_PAD_A { A8 } -#define ENCODERS_PAD_B { A1 } -#define ENCODER_RESOLUTION 2 - // 2 bits for 4 layout options #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 diff --git a/keyboards/keebsforall/coarse60/info.json b/keyboards/keebsforall/coarse60/info.json index 29a7850fc8a5..8e1c2d056ebb 100644 --- a/keyboards/keebsforall/coarse60/info.json +++ b/keyboards/keebsforall/coarse60/info.json @@ -8,6 +8,11 @@ "pid": "0x5341", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A8", "pin_b": "A1", "resolution": 2} + ] + }, "indicators": { "caps_lock": "B10", "num_lock": "B2", diff --git a/keyboards/keebsforall/freebirdnp/pro/config.h b/keyboards/keebsforall/freebirdnp/pro/config.h index 943d87d730fa..85bcc17f0e08 100644 --- a/keyboards/keebsforall/freebirdnp/pro/config.h +++ b/keyboards/keebsforall/freebirdnp/pro/config.h @@ -17,10 +17,6 @@ along with this program. If not, see . #pragma once - -#define ENCODERS_PAD_A { D4 } -#define ENCODERS_PAD_B { D5 } - /* * Keyboard Matrix Assignments * diff --git a/keyboards/keebsforall/freebirdnp/pro/info.json b/keyboards/keebsforall/freebirdnp/pro/info.json index 40723c36996e..d4eda0ad0b8a 100644 --- a/keyboards/keebsforall/freebirdnp/pro/info.json +++ b/keyboards/keebsforall/freebirdnp/pro/info.json @@ -8,6 +8,11 @@ "pid": "0x1014", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "D5"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "community_layouts": ["numpad_6x4", "ortho_6x4"], diff --git a/keyboards/keybage/radpad/config.h b/keyboards/keybage/radpad/config.h index 240f334ccf76..f2988c8ede08 100644 --- a/keyboards/keybage/radpad/config.h +++ b/keyboards/keybage/radpad/config.h @@ -23,11 +23,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D4, F6 } -#define ENCODERS_PAD_B { C6, F7 } - -#define ENCODER_RESOLUTION 2 - #define RGB_DI_PIN F4 #ifdef RGB_DI_PIN #define RGBLED_NUM 16 diff --git a/keyboards/keybage/radpad/info.json b/keyboards/keybage/radpad/info.json index c2d77fca5012..f0c0dcd63fa7 100644 --- a/keyboards/keybage/radpad/info.json +++ b/keyboards/keybage/radpad/info.json @@ -8,6 +8,12 @@ "pid": "0x5250", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "C6", "resolution": 2}, + {"pin_a": "F6", "pin_b": "F7", "resolution": 2} + ] + }, "bootmagic": { "matrix": [1, 3] }, diff --git a/keyboards/keycapsss/kimiko/rev1/config.h b/keyboards/keycapsss/kimiko/rev1/config.h index fbcf482c355f..592fefe5d471 100644 --- a/keyboards/keycapsss/kimiko/rev1/config.h +++ b/keyboards/keycapsss/kimiko/rev1/config.h @@ -38,13 +38,6 @@ #define RGBLIGHT_LIMIT_VAL 80 #endif -#ifdef ENCODER_ENABLE -# define ENCODERS_PAD_A { F4 } -# define ENCODERS_PAD_B { F5 } -# define ENCODERS_PAD_A_RIGHT { F4 } -# define ENCODERS_PAD_B_RIGHT { F5 } -#endif - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/keycapsss/kimiko/rev1/info.json b/keyboards/keycapsss/kimiko/rev1/info.json index 09f5867a4c91..0bfeffe39ac5 100644 --- a/keyboards/keycapsss/kimiko/rev1/info.json +++ b/keyboards/keycapsss/kimiko/rev1/info.json @@ -8,6 +8,11 @@ "pid": "0x4B69", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/keycapsss/plaid_pad/rev1/config.h b/keyboards/keycapsss/plaid_pad/rev1/config.h index 5956835a0b22..ef2037c5684f 100644 --- a/keyboards/keycapsss/plaid_pad/rev1/config.h +++ b/keyboards/keycapsss/plaid_pad/rev1/config.h @@ -16,8 +16,5 @@ #pragma once -#define ENCODERS_PAD_A { D1, B2 } -#define ENCODERS_PAD_B { D0, B1 } - #define LED_RED C5 // LED1 #define LED_GREEN C4 // LED2 diff --git a/keyboards/keycapsss/plaid_pad/rev1/info.json b/keyboards/keycapsss/plaid_pad/rev1/info.json index 3d98c4cb575a..b9fe9e977a20 100644 --- a/keyboards/keycapsss/plaid_pad/rev1/info.json +++ b/keyboards/keycapsss/plaid_pad/rev1/info.json @@ -2,5 +2,11 @@ "keyboard_name": "Plaid-Pad Rev1", "usb": { "device_version": "0.0.1" - } + }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"}, + {"pin_a": "B2", "pin_b": "B1"} + ] + }, } diff --git a/keyboards/keycapsss/plaid_pad/rev2/config.h b/keyboards/keycapsss/plaid_pad/rev2/config.h index efb2609eddf8..ef2037c5684f 100644 --- a/keyboards/keycapsss/plaid_pad/rev2/config.h +++ b/keyboards/keycapsss/plaid_pad/rev2/config.h @@ -16,8 +16,5 @@ #pragma once -#define ENCODERS_PAD_A { D1, B2, B4, D4 } -#define ENCODERS_PAD_B { D0, B1, B3, B5 } - #define LED_RED C5 // LED1 #define LED_GREEN C4 // LED2 diff --git a/keyboards/keycapsss/plaid_pad/rev2/info.json b/keyboards/keycapsss/plaid_pad/rev2/info.json index 0a1da66f73f1..637139c5a446 100644 --- a/keyboards/keycapsss/plaid_pad/rev2/info.json +++ b/keyboards/keycapsss/plaid_pad/rev2/info.json @@ -2,5 +2,13 @@ "keyboard_name": "Plaid-Pad Rev2", "usb": { "device_version": "0.0.2" + }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"}, + {"pin_a": "B2", "pin_b": "B1"}, + {"pin_a": "B4", "pin_b": "B3"}, + {"pin_a": "D4", "pin_b": "B5"} + ] } } diff --git a/keyboards/keycapsss/plaid_pad/rev3/config.h b/keyboards/keycapsss/plaid_pad/rev3/config.h deleted file mode 100644 index 7e4786c5bca9..000000000000 --- a/keyboards/keycapsss/plaid_pad/rev3/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright 2020 Ben Roesner (keycapsss.com) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define ENCODERS_PAD_A { D1, B2, B4, D4 } -#define ENCODERS_PAD_B { D0, B1, B3, B5 } diff --git a/keyboards/keycapsss/plaid_pad/rev3/info.json b/keyboards/keycapsss/plaid_pad/rev3/info.json index 2f5b474c4d83..93b5e3bdc977 100644 --- a/keyboards/keycapsss/plaid_pad/rev3/info.json +++ b/keyboards/keycapsss/plaid_pad/rev3/info.json @@ -2,5 +2,13 @@ "keyboard_name": "Plaid-Pad Rev3", "usb": { "device_version": "0.0.3" - } + }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"}, + {"pin_a": "B2", "pin_b": "B1"}, + {"pin_a": "B4", "pin_b": "B3"}, + {"pin_a": "D4", "pin_b": "B5"} + ] + }, } diff --git a/keyboards/keychron/q0/rev_0131/config.h b/keyboards/keychron/q0/rev_0131/config.h index 78db924923c3..f94517ebb40e 100644 --- a/keyboards/keychron/q0/rev_0131/config.h +++ b/keyboards/keychron/q0/rev_0131/config.h @@ -35,6 +35,4 @@ #define NUM_LOCK_LED_INDEX 5 /* Encoder Configuration */ -#define ENCODERS_PAD_A { A3 } -#define ENCODERS_PAD_B { A4 } #define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q0/rev_0131/info.json b/keyboards/keychron/q0/rev_0131/info.json index ad555630f91e..94808bd9c4dc 100644 --- a/keyboards/keychron/q0/rev_0131/info.json +++ b/keyboards/keychron/q0/rev_0131/info.json @@ -8,6 +8,11 @@ "pid": "0x0131", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A3", "pin_b": "A4"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/keychron/q1/ansi_encoder/config.h b/keyboards/keychron/q1/ansi_encoder/config.h index 92dd09ccd394..a41976d560bd 100644 --- a/keyboards/keychron/q1/ansi_encoder/config.h +++ b/keyboards/keychron/q1/ansi_encoder/config.h @@ -24,7 +24,3 @@ #define DRIVER_1_LED_TOTAL 59 #define DRIVER_2_LED_TOTAL 23 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) - -/* Encoder used pins */ -#define ENCODERS_PAD_A { E6 } -#define ENCODERS_PAD_B { B7 } diff --git a/keyboards/keychron/q1/ansi_encoder/info.json b/keyboards/keychron/q1/ansi_encoder/info.json index 8fdd64ed7a46..2391e674ad0d 100644 --- a/keyboards/keychron/q1/ansi_encoder/info.json +++ b/keyboards/keychron/q1/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0101", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "E6", "pin_b": "B7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/keychron/q1/iso_encoder/config.h b/keyboards/keychron/q1/iso_encoder/config.h index 984b3c77d02c..b52fb88383c3 100644 --- a/keyboards/keychron/q1/iso_encoder/config.h +++ b/keyboards/keychron/q1/iso_encoder/config.h @@ -33,9 +33,5 @@ #define DRIVER_2_LED_TOTAL 24 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -/* Encoder Configuration */ -#define ENCODERS_PAD_A { E6 } -#define ENCODERS_PAD_B { B7 } - /* Enable caps-lock LED */ #define CAPS_LOCK_LED_INDEX 44 diff --git a/keyboards/keychron/q1/iso_encoder/info.json b/keyboards/keychron/q1/iso_encoder/info.json index 573c43696fac..e4dce374c85b 100644 --- a/keyboards/keychron/q1/iso_encoder/info.json +++ b/keyboards/keychron/q1/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0103", "device_version": "1.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "E6", "pin_b": "B7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/keychron/q10/ansi_encoder/config.h b/keyboards/keychron/q10/ansi_encoder/config.h index 9f4a4d927686..9012abd4f75c 100644 --- a/keyboards/keychron/q10/ansi_encoder/config.h +++ b/keyboards/keychron/q10/ansi_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q10/ansi_encoder/info.json b/keyboards/keychron/q10/ansi_encoder/info.json index 70de4d95be67..9814da0c264c 100644 --- a/keyboards/keychron/q10/ansi_encoder/info.json +++ b/keyboards/keychron/q10/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x01A1", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/keychron/q10/iso_encoder/config.h b/keyboards/keychron/q10/iso_encoder/config.h index 9a57d5954dd4..7a5646c56e2f 100644 --- a/keyboards/keychron/q10/iso_encoder/config.h +++ b/keyboards/keychron/q10/iso_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q10/iso_encoder/info.json b/keyboards/keychron/q10/iso_encoder/info.json index f0b5b2704e23..96311fac066e 100644 --- a/keyboards/keychron/q10/iso_encoder/info.json +++ b/keyboards/keychron/q10/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x01A3", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/keychron/q2/ansi_encoder/config.h b/keyboards/keychron/q2/ansi_encoder/config.h index 997e04741c4f..b7e4b1e7f871 100644 --- a/keyboards/keychron/q2/ansi_encoder/config.h +++ b/keyboards/keychron/q2/ansi_encoder/config.h @@ -22,6 +22,4 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder used pins */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { B5 } #define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q2/ansi_encoder/info.json b/keyboards/keychron/q2/ansi_encoder/info.json index f3eddd9ecbd2..a2a12dc39cef 100644 --- a/keyboards/keychron/q2/ansi_encoder/info.json +++ b/keyboards/keychron/q2/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0111", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "B5"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q2/iso_encoder/config.h b/keyboards/keychron/q2/iso_encoder/config.h index c28005c040f7..376b92b6fa11 100644 --- a/keyboards/keychron/q2/iso_encoder/config.h +++ b/keyboards/keychron/q2/iso_encoder/config.h @@ -22,6 +22,4 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder used pins */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { B5 } #define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q2/iso_encoder/info.json b/keyboards/keychron/q2/iso_encoder/info.json index 36184a880779..028522c25986 100644 --- a/keyboards/keychron/q2/iso_encoder/info.json +++ b/keyboards/keychron/q2/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0113", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "B5"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q2/jis_encoder/config.h b/keyboards/keychron/q2/jis_encoder/config.h index 47edae801e34..5e7ab551437f 100644 --- a/keyboards/keychron/q2/jis_encoder/config.h +++ b/keyboards/keychron/q2/jis_encoder/config.h @@ -24,8 +24,6 @@ #define CKLED2001_CURRENT_TUNE { 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D } /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { B5 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q2/jis_encoder/info.json b/keyboards/keychron/q2/jis_encoder/info.json index a0b5852b15c1..18e800703b9a 100644 --- a/keyboards/keychron/q2/jis_encoder/info.json +++ b/keyboards/keychron/q2/jis_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0115", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "B5"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q3/ansi_encoder/config.h b/keyboards/keychron/q3/ansi_encoder/config.h index 16e791b47b11..201288841a6b 100644 --- a/keyboards/keychron/q3/ansi_encoder/config.h +++ b/keyboards/keychron/q3/ansi_encoder/config.h @@ -26,8 +26,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 #define CKLED2001_CURRENT_TUNE \ diff --git a/keyboards/keychron/q3/ansi_encoder/info.json b/keyboards/keychron/q3/ansi_encoder/info.json index 491a2831c87e..3bd5a9d59a1c 100644 --- a/keyboards/keychron/q3/ansi_encoder/info.json +++ b/keyboards/keychron/q3/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0121", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q3/iso_encoder/config.h b/keyboards/keychron/q3/iso_encoder/config.h index 3d750b18b50c..2ee93a4faeac 100644 --- a/keyboards/keychron/q3/iso_encoder/config.h +++ b/keyboards/keychron/q3/iso_encoder/config.h @@ -26,8 +26,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 #define CKLED2001_CURRENT_TUNE \ diff --git a/keyboards/keychron/q3/iso_encoder/info.json b/keyboards/keychron/q3/iso_encoder/info.json index 06fb0338256a..6f1a24b37235 100644 --- a/keyboards/keychron/q3/iso_encoder/info.json +++ b/keyboards/keychron/q3/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0123", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q3/jis_encoder/config.h b/keyboards/keychron/q3/jis_encoder/config.h index 9c2f248baa53..9fca0cfc73ce 100644 --- a/keyboards/keychron/q3/jis_encoder/config.h +++ b/keyboards/keychron/q3/jis_encoder/config.h @@ -31,8 +31,6 @@ { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable CapsLcok LED */ diff --git a/keyboards/keychron/q3/jis_encoder/info.json b/keyboards/keychron/q3/jis_encoder/info.json index 7e203cb9c981..ed1247273259 100644 --- a/keyboards/keychron/q3/jis_encoder/info.json +++ b/keyboards/keychron/q3/jis_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0125", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q5/ansi_encoder/config.h b/keyboards/keychron/q5/ansi_encoder/config.h index 64fb8babc8ad..3986c11a027e 100644 --- a/keyboards/keychron/q5/ansi_encoder/config.h +++ b/keyboards/keychron/q5/ansi_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { C14 } -#define ENCODERS_PAD_B { A2 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q5/ansi_encoder/info.json b/keyboards/keychron/q5/ansi_encoder/info.json index ab5d25320a67..7bd6f179c6ae 100644 --- a/keyboards/keychron/q5/ansi_encoder/info.json +++ b/keyboards/keychron/q5/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0151", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "C14", "pin_b": "A2"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q5/iso_encoder/config.h b/keyboards/keychron/q5/iso_encoder/config.h index fd73bf127cdb..3a786cbb39be 100644 --- a/keyboards/keychron/q5/iso_encoder/config.h +++ b/keyboards/keychron/q5/iso_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { C14 } -#define ENCODERS_PAD_B { A2 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q5/iso_encoder/info.json b/keyboards/keychron/q5/iso_encoder/info.json index 59a4ad32334c..81cd72036f45 100644 --- a/keyboards/keychron/q5/iso_encoder/info.json +++ b/keyboards/keychron/q5/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0153", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "C14", "pin_b": "A2"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q6/ansi_encoder/config.h b/keyboards/keychron/q6/ansi_encoder/config.h index a3c19cbe4186..573fa614a321 100644 --- a/keyboards/keychron/q6/ansi_encoder/config.h +++ b/keyboards/keychron/q6/ansi_encoder/config.h @@ -31,8 +31,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { C14 } -#define ENCODERS_PAD_B { A2 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED*/ diff --git a/keyboards/keychron/q6/ansi_encoder/info.json b/keyboards/keychron/q6/ansi_encoder/info.json index 86d2cda5d16f..60b983b12e7b 100644 --- a/keyboards/keychron/q6/ansi_encoder/info.json +++ b/keyboards/keychron/q6/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0161", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "C14", "pin_b": "A2"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q6/iso_encoder/config.h b/keyboards/keychron/q6/iso_encoder/config.h index 95c596e392f6..512a33bafdec 100644 --- a/keyboards/keychron/q6/iso_encoder/config.h +++ b/keyboards/keychron/q6/iso_encoder/config.h @@ -31,8 +31,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { C14 } -#define ENCODERS_PAD_B { A2 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED*/ diff --git a/keyboards/keychron/q6/iso_encoder/info.json b/keyboards/keychron/q6/iso_encoder/info.json index 2996e0022a7a..598a715c3f06 100644 --- a/keyboards/keychron/q6/iso_encoder/info.json +++ b/keyboards/keychron/q6/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0163", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "C14", "pin_b": "A2"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q65/ansi_encoder/config.h b/keyboards/keychron/q65/ansi_encoder/config.h index 99fe810f9f0a..f57797677e9d 100644 --- a/keyboards/keychron/q65/ansi_encoder/config.h +++ b/keyboards/keychron/q65/ansi_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q65/ansi_encoder/info.json b/keyboards/keychron/q65/ansi_encoder/info.json index a7ec2d56b33a..b91892a55bc3 100644 --- a/keyboards/keychron/q65/ansi_encoder/info.json +++ b/keyboards/keychron/q65/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x01B1", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/keychron/q8/ansi_encoder/config.h b/keyboards/keychron/q8/ansi_encoder/config.h index 493200fdad0f..63d16c21af23 100644 --- a/keyboards/keychron/q8/ansi_encoder/config.h +++ b/keyboards/keychron/q8/ansi_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { A10 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q8/ansi_encoder/info.json b/keyboards/keychron/q8/ansi_encoder/info.json index 3859c19dee7c..b75a87819864 100644 --- a/keyboards/keychron/q8/ansi_encoder/info.json +++ b/keyboards/keychron/q8/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0181", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "A10"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q8/iso_encoder/config.h b/keyboards/keychron/q8/iso_encoder/config.h index 345f40a10fbe..cdda41df5d09 100644 --- a/keyboards/keychron/q8/iso_encoder/config.h +++ b/keyboards/keychron/q8/iso_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { A10 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q8/iso_encoder/info.json b/keyboards/keychron/q8/iso_encoder/info.json index 48a32c915cf4..45181452bea5 100644 --- a/keyboards/keychron/q8/iso_encoder/info.json +++ b/keyboards/keychron/q8/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0183", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "A10"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q9/ansi_encoder/config.h b/keyboards/keychron/q9/ansi_encoder/config.h index be8de5961e14..6850e5c2d67d 100644 --- a/keyboards/keychron/q9/ansi_encoder/config.h +++ b/keyboards/keychron/q9/ansi_encoder/config.h @@ -21,8 +21,6 @@ #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL /* Encoder Configuration */ -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q9/ansi_encoder/info.json b/keyboards/keychron/q9/ansi_encoder/info.json index 54719d574966..5100c189450b 100644 --- a/keyboards/keychron/q9/ansi_encoder/info.json +++ b/keyboards/keychron/q9/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0191", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q9/iso_encoder/config.h b/keyboards/keychron/q9/iso_encoder/config.h index cbdbcc555084..65d7ad770824 100644 --- a/keyboards/keychron/q9/iso_encoder/config.h +++ b/keyboards/keychron/q9/iso_encoder/config.h @@ -21,8 +21,6 @@ #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL /* Encoder Configuration */ -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/q9/iso_encoder/info.json b/keyboards/keychron/q9/iso_encoder/info.json index 4e4819519d3d..dee0a8953aab 100644 --- a/keyboards/keychron/q9/iso_encoder/info.json +++ b/keyboards/keychron/q9/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0193", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v1/ansi_encoder/config.h b/keyboards/keychron/v1/ansi_encoder/config.h index 06b7676225d8..c32e4d104a37 100644 --- a/keyboards/keychron/v1/ansi_encoder/config.h +++ b/keyboards/keychron/v1/ansi_encoder/config.h @@ -25,8 +25,6 @@ { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v1/ansi_encoder/info.json b/keyboards/keychron/v1/ansi_encoder/info.json index 19322f1fc988..af396f6bb608 100644 --- a/keyboards/keychron/v1/ansi_encoder/info.json +++ b/keyboards/keychron/v1/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0311", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v1/iso_encoder/config.h b/keyboards/keychron/v1/iso_encoder/config.h index b99639188999..fd231aa98a18 100644 --- a/keyboards/keychron/v1/iso_encoder/config.h +++ b/keyboards/keychron/v1/iso_encoder/config.h @@ -25,8 +25,6 @@ { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v1/iso_encoder/info.json b/keyboards/keychron/v1/iso_encoder/info.json index 9febe465db7a..c08e7d4539b5 100644 --- a/keyboards/keychron/v1/iso_encoder/info.json +++ b/keyboards/keychron/v1/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0313", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v1/jis_encoder/config.h b/keyboards/keychron/v1/jis_encoder/config.h index 6ade4684b8ab..93d2a72d98a6 100644 --- a/keyboards/keychron/v1/jis_encoder/config.h +++ b/keyboards/keychron/v1/jis_encoder/config.h @@ -25,8 +25,6 @@ { 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D } /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v1/jis_encoder/info.json b/keyboards/keychron/v1/jis_encoder/info.json index abbe941427e9..755449848175 100644 --- a/keyboards/keychron/v1/jis_encoder/info.json +++ b/keyboards/keychron/v1/jis_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0315", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v10/ansi_encoder/config.h b/keyboards/keychron/v10/ansi_encoder/config.h index 09a37a75ef96..8b5595e4d6c6 100644 --- a/keyboards/keychron/v10/ansi_encoder/config.h +++ b/keyboards/keychron/v10/ansi_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v10/ansi_encoder/info.json b/keyboards/keychron/v10/ansi_encoder/info.json index c3b78316d522..cf8ae78b99e3 100644 --- a/keyboards/keychron/v10/ansi_encoder/info.json +++ b/keyboards/keychron/v10/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x03A1", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/keychron/v10/iso_encoder/config.h b/keyboards/keychron/v10/iso_encoder/config.h index adfbf17e54f8..75706949d619 100644 --- a/keyboards/keychron/v10/iso_encoder/config.h +++ b/keyboards/keychron/v10/iso_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v10/iso_encoder/info.json b/keyboards/keychron/v10/iso_encoder/info.json index ed48f6270a4a..554e0b907e73 100644 --- a/keyboards/keychron/v10/iso_encoder/info.json +++ b/keyboards/keychron/v10/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x03A3", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/keychron/v2/ansi_encoder/config.h b/keyboards/keychron/v2/ansi_encoder/config.h index 63dc19c951c8..6ee6d1e7c66e 100644 --- a/keyboards/keychron/v2/ansi_encoder/config.h +++ b/keyboards/keychron/v2/ansi_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { B5 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v2/ansi_encoder/info.json b/keyboards/keychron/v2/ansi_encoder/info.json index 257bd6b5fc74..1e729eb6368c 100644 --- a/keyboards/keychron/v2/ansi_encoder/info.json +++ b/keyboards/keychron/v2/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0321", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "B5"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v2/iso_encoder/config.h b/keyboards/keychron/v2/iso_encoder/config.h index 11c3726df2c3..f69d6834538d 100644 --- a/keyboards/keychron/v2/iso_encoder/config.h +++ b/keyboards/keychron/v2/iso_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { B5 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v2/iso_encoder/info.json b/keyboards/keychron/v2/iso_encoder/info.json index 212129eeb473..a784b33ec575 100644 --- a/keyboards/keychron/v2/iso_encoder/info.json +++ b/keyboards/keychron/v2/iso_encoder/info.json @@ -7,6 +7,11 @@ "pid": "0x0323", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "B5"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v2/jis_encoder/config.h b/keyboards/keychron/v2/jis_encoder/config.h index 4c0c0518f871..a9a3438ab759 100644 --- a/keyboards/keychron/v2/jis_encoder/config.h +++ b/keyboards/keychron/v2/jis_encoder/config.h @@ -25,8 +25,6 @@ { 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D } /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { B5 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v2/jis_encoder/info.json b/keyboards/keychron/v2/jis_encoder/info.json index d284dd5a2492..abb76636f73e 100644 --- a/keyboards/keychron/v2/jis_encoder/info.json +++ b/keyboards/keychron/v2/jis_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0325", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "B5"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v3/ansi_encoder/config.h b/keyboards/keychron/v3/ansi_encoder/config.h index 736c97bdf975..6310f181a08c 100644 --- a/keyboards/keychron/v3/ansi_encoder/config.h +++ b/keyboards/keychron/v3/ansi_encoder/config.h @@ -28,8 +28,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable CapsLcok LED */ diff --git a/keyboards/keychron/v3/ansi_encoder/info.json b/keyboards/keychron/v3/ansi_encoder/info.json index fb9a1a669e78..5fdf765356da 100644 --- a/keyboards/keychron/v3/ansi_encoder/info.json +++ b/keyboards/keychron/v3/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0331", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v3/iso_encoder/config.h b/keyboards/keychron/v3/iso_encoder/config.h index c68cef1b282f..7033a2093aa4 100644 --- a/keyboards/keychron/v3/iso_encoder/config.h +++ b/keyboards/keychron/v3/iso_encoder/config.h @@ -28,8 +28,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v3/iso_encoder/info.json b/keyboards/keychron/v3/iso_encoder/info.json index 34ff04a9d06a..b38ad45930b1 100644 --- a/keyboards/keychron/v3/iso_encoder/info.json +++ b/keyboards/keychron/v3/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0333", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v3/jis_encoder/config.h b/keyboards/keychron/v3/jis_encoder/config.h index c2a4faac49a1..5f67d6a870d8 100644 --- a/keyboards/keychron/v3/jis_encoder/config.h +++ b/keyboards/keychron/v3/jis_encoder/config.h @@ -31,8 +31,6 @@ { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { A8 } #define ENCODER_DEFAULT_POS 0x3 /* Enable CapsLcok LED */ diff --git a/keyboards/keychron/v3/jis_encoder/info.json b/keyboards/keychron/v3/jis_encoder/info.json index 86374520f7cb..1f2d2b425b47 100644 --- a/keyboards/keychron/v3/jis_encoder/info.json +++ b/keyboards/keychron/v3/jis_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0335", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "A8"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v5/ansi_encoder/config.h b/keyboards/keychron/v5/ansi_encoder/config.h index 4e1b281a3d3e..6ce87e63ab84 100644 --- a/keyboards/keychron/v5/ansi_encoder/config.h +++ b/keyboards/keychron/v5/ansi_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { C14 } -#define ENCODERS_PAD_B { A2 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v5/ansi_encoder/info.json b/keyboards/keychron/v5/ansi_encoder/info.json index b9da185e56de..9461379d1ab0 100644 --- a/keyboards/keychron/v5/ansi_encoder/info.json +++ b/keyboards/keychron/v5/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0351", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "C14", "pin_b": "A2"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v5/iso_encoder/config.h b/keyboards/keychron/v5/iso_encoder/config.h index e1fa95b8f8d8..dab565612eb3 100644 --- a/keyboards/keychron/v5/iso_encoder/config.h +++ b/keyboards/keychron/v5/iso_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { C14 } -#define ENCODERS_PAD_B { A2 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v5/iso_encoder/info.json b/keyboards/keychron/v5/iso_encoder/info.json index edde8d4b21d1..21c1891069fa 100644 --- a/keyboards/keychron/v5/iso_encoder/info.json +++ b/keyboards/keychron/v5/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0353", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "C14", "pin_b": "A2"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v6/ansi_encoder/config.h b/keyboards/keychron/v6/ansi_encoder/config.h index 10db17084fd5..0d8d843d2f34 100644 --- a/keyboards/keychron/v6/ansi_encoder/config.h +++ b/keyboards/keychron/v6/ansi_encoder/config.h @@ -37,8 +37,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { C14 } -#define ENCODERS_PAD_B { A2 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED*/ diff --git a/keyboards/keychron/v6/ansi_encoder/info.json b/keyboards/keychron/v6/ansi_encoder/info.json index 1ac88337f32b..d6f46506ecae 100644 --- a/keyboards/keychron/v6/ansi_encoder/info.json +++ b/keyboards/keychron/v6/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0361", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "C14", "pin_b": "A2"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v6/iso_encoder/config.h b/keyboards/keychron/v6/iso_encoder/config.h index 6699b86bb1a1..6e8069f7ece3 100644 --- a/keyboards/keychron/v6/iso_encoder/config.h +++ b/keyboards/keychron/v6/iso_encoder/config.h @@ -37,8 +37,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { C14 } -#define ENCODERS_PAD_B { A2 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED*/ diff --git a/keyboards/keychron/v6/iso_encoder/info.json b/keyboards/keychron/v6/iso_encoder/info.json index f0e4a3d4f2d1..d8f86e5aa0b8 100644 --- a/keyboards/keychron/v6/iso_encoder/info.json +++ b/keyboards/keychron/v6/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0363", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "C14", "pin_b": "A2"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v8/ansi_encoder/config.h b/keyboards/keychron/v8/ansi_encoder/config.h index cef883edf33b..57b9bd027072 100644 --- a/keyboards/keychron/v8/ansi_encoder/config.h +++ b/keyboards/keychron/v8/ansi_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { B5 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v8/ansi_encoder/info.json b/keyboards/keychron/v8/ansi_encoder/info.json index c33b8955e852..f6a9de655b49 100644 --- a/keyboards/keychron/v8/ansi_encoder/info.json +++ b/keyboards/keychron/v8/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0381", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "B5"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v8/iso_encoder/config.h b/keyboards/keychron/v8/iso_encoder/config.h index b8e1a5206c5a..0bb4fbf8217e 100644 --- a/keyboards/keychron/v8/iso_encoder/config.h +++ b/keyboards/keychron/v8/iso_encoder/config.h @@ -22,8 +22,6 @@ #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ -#define ENCODERS_PAD_A { A10 } -#define ENCODERS_PAD_B { B5 } #define ENCODER_DEFAULT_POS 0x3 /* Enable caps-lock LED */ diff --git a/keyboards/keychron/v8/iso_encoder/info.json b/keyboards/keychron/v8/iso_encoder/info.json index ad546d0e3303..2abaeda111f2 100644 --- a/keyboards/keychron/v8/iso_encoder/info.json +++ b/keyboards/keychron/v8/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0383", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A10", "pin_b": "B5"} + ] + }, "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keyhive/absinthe/config.h b/keyboards/keyhive/absinthe/config.h index e8e33187d9fc..0c7fe33f6bae 100644 --- a/keyboards/keyhive/absinthe/config.h +++ b/keyboards/keyhive/absinthe/config.h @@ -31,9 +31,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D2, D1, B6, D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D3, D0 } -#define ENCODERS_PAD_A { B7 } -#define ENCODERS_PAD_B { D5 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyhive/absinthe/info.json b/keyboards/keyhive/absinthe/info.json index 7739f4f17157..336707f23920 100644 --- a/keyboards/keyhive/absinthe/info.json +++ b/keyboards/keyhive/absinthe/info.json @@ -8,6 +8,11 @@ "pid": "0xFEED", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B7", "pin_b": "D5"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/keyhive/uno/rev2/config.h b/keyboards/keyhive/uno/rev2/config.h index b9e3a702861d..e940f5fa057b 100644 --- a/keyboards/keyhive/uno/rev2/config.h +++ b/keyboards/keyhive/uno/rev2/config.h @@ -18,10 +18,6 @@ #define RGBLIGHT_EFFECT_RAINBOW_MOOD -/* ENCODER */ -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B3 } - #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN D1 #define RGBLED_NUM 1 diff --git a/keyboards/keyhive/uno/rev2/info.json b/keyboards/keyhive/uno/rev2/info.json index 2ea14e8aeb7c..66e0ca20e04d 100644 --- a/keyboards/keyhive/uno/rev2/info.json +++ b/keyboards/keyhive/uno/rev2/info.json @@ -3,6 +3,11 @@ "usb": { "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/keyprez/bison/config.h b/keyboards/keyprez/bison/config.h index 6b1c7f64e7d6..ba68e0d9761a 100644 --- a/keyboards/keyprez/bison/config.h +++ b/keyboards/keyprez/bison/config.h @@ -34,11 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B6 } -#define ENCODERS_PAD_B { B5 } -#define ENCODERS_PAD_A_RIGHT { B5 } -#define ENCODERS_PAD_B_RIGHT { B6 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/keyprez/bison/info.json b/keyboards/keyprez/bison/info.json index 5c33dc5fa67d..a18beb8305c3 100644 --- a/keyboards/keyprez/bison/info.json +++ b/keyboards/keyprez/bison/info.json @@ -8,8 +8,20 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B5"} + ] + }, "split": { - "soft_serial_pin": "D0" + "soft_serial_pin": "D0", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B6"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/keyprez/corgi/config.h b/keyboards/keyprez/corgi/config.h index 99030069787e..081e14372dbf 100644 --- a/keyboards/keyprez/corgi/config.h +++ b/keyboards/keyprez/corgi/config.h @@ -28,9 +28,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D4 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/keyprez/corgi/info.json b/keyboards/keyprez/corgi/info.json index daaacae394e6..f130ae59193d 100644 --- a/keyboards/keyprez/corgi/info.json +++ b/keyboards/keyprez/corgi/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D4"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 0, diff --git a/keyboards/keyprez/rhino/config.h b/keyboards/keyprez/rhino/config.h index 832659eb6cef..3ea5c1384d6f 100644 --- a/keyboards/keyprez/rhino/config.h +++ b/keyboards/keyprez/rhino/config.h @@ -34,9 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D1 } -#define ENCODERS_PAD_B { D0 } - #define AUDIO_PIN C6 #define MUSIC_MAP diff --git a/keyboards/keyprez/rhino/info.json b/keyboards/keyprez/rhino/info.json index b203dc23d704..f92ce7b0b226 100644 --- a/keyboards/keyprez/rhino/info.json +++ b/keyboards/keyprez/rhino/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 2, diff --git a/keyboards/keyprez/unicorn/config.h b/keyboards/keyprez/unicorn/config.h index 84bbce55cc3c..80747b54be3b 100644 --- a/keyboards/keyprez/unicorn/config.h +++ b/keyboards/keyprez/unicorn/config.h @@ -43,8 +43,3 @@ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D4 } -#define ENCODERS_PAD_A_RIGHT { D2 } -#define ENCODERS_PAD_B_RIGHT { D4 } diff --git a/keyboards/keyprez/unicorn/info.json b/keyboards/keyprez/unicorn/info.json index 03de7b5c8c65..e3afebbc0f69 100644 --- a/keyboards/keyprez/unicorn/info.json +++ b/keyboards/keyprez/unicorn/info.json @@ -8,6 +8,11 @@ "pid": "0x7563", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D4"} + ] + }, "split": { "soft_serial_pin": "D0" }, diff --git a/keyboards/keysofkings/twokey/config.h b/keyboards/keysofkings/twokey/config.h index 3fba4f8efa6e..21661d533d36 100755 --- a/keyboards/keysofkings/twokey/config.h +++ b/keyboards/keysofkings/twokey/config.h @@ -21,11 +21,6 @@ #define MATRIX_ROW_PINS { B4, B5 } #define MATRIX_COL_PINS { B3, B2 } - -#define ENCODERS_PAD_A { D7 } -#define ENCODERS_PAD_B { E6 } -#define ENCODER_RESOLUTION 1 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keysofkings/twokey/info.json b/keyboards/keysofkings/twokey/info.json index 86e3a070e909..910d8cc0eff0 100644 --- a/keyboards/keysofkings/twokey/info.json +++ b/keyboards/keysofkings/twokey/info.json @@ -8,6 +8,11 @@ "pid": "0xAE12", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D7", "pin_b": "E6", "resolution": 1} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/keystonecaps/gameroyadvance/config.h b/keyboards/keystonecaps/gameroyadvance/config.h index a4bcd20641f1..75b25e02c374 100644 --- a/keyboards/keystonecaps/gameroyadvance/config.h +++ b/keyboards/keystonecaps/gameroyadvance/config.h @@ -23,10 +23,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, D0, D1, C6, D7, E6, F4, B2, B6 } #define MATRIX_ROW_PINS_RIGHT { D7, E6, B4, B5, B6 } #define MATRIX_COL_PINS_RIGHT { C6, D4, D0, D1, B1, F7, F4, F5, F6 } -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { B4 } -#define ENCODERS_PAD_A_RIGHT { B3 } -#define ENCODERS_PAD_B_RIGHT { B2 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keystonecaps/gameroyadvance/info.json b/keyboards/keystonecaps/gameroyadvance/info.json index 703c6a864a66..7a968deded9d 100644 --- a/keyboards/keystonecaps/gameroyadvance/info.json +++ b/keyboards/keystonecaps/gameroyadvance/info.json @@ -8,8 +8,20 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B4"} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/kikoslab/ellora65/config.h b/keyboards/kikoslab/ellora65/config.h index cc87fc39f799..1243e775d310 100644 --- a/keyboards/kikoslab/ellora65/config.h +++ b/keyboards/kikoslab/ellora65/config.h @@ -26,9 +26,6 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B0 } -#define ENCODERS_PAD_B { B1 } - /*RGB TINGS*/ #define RGB_DI_PIN E6 #define RGBLED_NUM 12 diff --git a/keyboards/kikoslab/ellora65/info.json b/keyboards/kikoslab/ellora65/info.json index e143889119a3..2fae75098534 100644 --- a/keyboards/kikoslab/ellora65/info.json +++ b/keyboards/kikoslab/ellora65/info.json @@ -8,6 +8,11 @@ "pid": "0xE88F", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1"} + ] + }, "bootmagic": { "matrix": [1, 0] }, diff --git a/keyboards/kikoslab/kl90/config.h b/keyboards/kikoslab/kl90/config.h index ffae7d10fcfd..f5f54eee2c32 100644 --- a/keyboards/kikoslab/kl90/config.h +++ b/keyboards/kikoslab/kl90/config.h @@ -26,9 +26,6 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { A3, C3 } -#define ENCODERS_PAD_B { A4, C4 } - #define EMCODER_DIRECTION_FLIP /*EEPROM for via*/ diff --git a/keyboards/kikoslab/kl90/info.json b/keyboards/kikoslab/kl90/info.json index 7caa9824b05d..f063fd2323f2 100644 --- a/keyboards/kikoslab/kl90/info.json +++ b/keyboards/kikoslab/kl90/info.json @@ -8,6 +8,12 @@ "pid": "0xEA53", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A3", "pin_b": "A4"}, + {"pin_a": "C3", "pin_b": "C4"} + ] + }, "processor": "at90usb1286", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/kingly_keys/ave/config.h b/keyboards/kingly_keys/ave/config.h index adee0a4d10ab..fadfdae7150f 100644 --- a/keyboards/kingly_keys/ave/config.h +++ b/keyboards/kingly_keys/ave/config.h @@ -17,10 +17,6 @@ #pragma once - -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B1 } - #define MATRIX_ROW_PINS { B3, F4, F7, F6, F5 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0} diff --git a/keyboards/kingly_keys/ave/ortho/info.json b/keyboards/kingly_keys/ave/ortho/info.json index f9344727c11e..cdd3f4183540 100644 --- a/keyboards/kingly_keys/ave/ortho/info.json +++ b/keyboards/kingly_keys/ave/ortho/info.json @@ -8,6 +8,11 @@ "pid": "0x1225", "device_version": "0.1.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/kingly_keys/ave/staggered/info.json b/keyboards/kingly_keys/ave/staggered/info.json index 9b0d9cf0c1c8..2e9c83df4cbc 100644 --- a/keyboards/kingly_keys/ave/staggered/info.json +++ b/keyboards/kingly_keys/ave/staggered/info.json @@ -8,6 +8,11 @@ "pid": "0x1225", "device_version": "0.1.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/kingly_keys/romac_plus/config.h b/keyboards/kingly_keys/romac_plus/config.h index 04e5cf4f5a6f..8392caa68904 100644 --- a/keyboards/kingly_keys/romac_plus/config.h +++ b/keyboards/kingly_keys/romac_plus/config.h @@ -5,9 +5,6 @@ #define MATRIX_ROW_PINS { C6, D4, D2, D3 } #define MATRIX_COL_PINS { F6, F5, F4 } -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B2 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kingly_keys/romac_plus/info.json b/keyboards/kingly_keys/romac_plus/info.json index b9ffc0707669..a93fa6496ba3 100644 --- a/keyboards/kingly_keys/romac_plus/info.json +++ b/keyboards/kingly_keys/romac_plus/info.json @@ -8,6 +8,11 @@ "pid": "0x0002", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/kingly_keys/ropro/config.h b/keyboards/kingly_keys/ropro/config.h index 51a108cd7ed2..d1e5d913403e 100644 --- a/keyboards/kingly_keys/ropro/config.h +++ b/keyboards/kingly_keys/ropro/config.h @@ -16,10 +16,6 @@ * along with this program. If not, see .#pragma once */ - -#define ENCODERS_PAD_A { B7 } -#define ENCODERS_PAD_B { D5 } - /* key matrix pins */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, F1, NO_PIN } #define MATRIX_COL_PINS { F0, D1, D0, D4, C6, D7, E6, B4, B5, B3, B2, B6, D2, C7 } diff --git a/keyboards/kingly_keys/ropro/info.json b/keyboards/kingly_keys/ropro/info.json index b9150cbcfa14..b2d3cf21e5bd 100644 --- a/keyboards/kingly_keys/ropro/info.json +++ b/keyboards/kingly_keys/ropro/info.json @@ -8,6 +8,11 @@ "pid": "0x0002", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B7", "pin_b": "D5"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/kingly_keys/soap/config.h b/keyboards/kingly_keys/soap/config.h index 012c6a923937..3127ee94112e 100644 --- a/keyboards/kingly_keys/soap/config.h +++ b/keyboards/kingly_keys/soap/config.h @@ -14,10 +14,6 @@ * along with this program. If not, see .#pragma once */ - -#define ENCODERS_PAD_A { D6 } -#define ENCODERS_PAD_B { D7 } - /* key matrix pins */ #define MATRIX_ROW_PINS { C7, C6 } #define MATRIX_COL_PINS { F4, F1, F0, D5 } diff --git a/keyboards/kingly_keys/soap/info.json b/keyboards/kingly_keys/soap/info.json index 2caa2c27b63a..b910faac329a 100644 --- a/keyboards/kingly_keys/soap/info.json +++ b/keyboards/kingly_keys/soap/info.json @@ -8,6 +8,11 @@ "pid": "0x0003", "device_version": "0.0.4" }, + "encoder": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/kiwikeebs/macro/config.h b/keyboards/kiwikeebs/macro/config.h index 2e49fafd4d84..3d06b6bc0414 100644 --- a/keyboards/kiwikeebs/macro/config.h +++ b/keyboards/kiwikeebs/macro/config.h @@ -34,9 +34,6 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D1 } -#define ENCODERS_PAD_B { D0 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/kiwikeebs/macro/info.json b/keyboards/kiwikeebs/macro/info.json index 223bd710352c..ae6ed513a279 100644 --- a/keyboards/kiwikeebs/macro/info.json +++ b/keyboards/kiwikeebs/macro/info.json @@ -8,6 +8,11 @@ "pid": "0x4712", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/kiwikeebs/macro_v2/config.h b/keyboards/kiwikeebs/macro_v2/config.h index f1dc869ab07b..d5fe49330f1f 100644 --- a/keyboards/kiwikeebs/macro_v2/config.h +++ b/keyboards/kiwikeebs/macro_v2/config.h @@ -34,9 +34,6 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D7 } -#define ENCODERS_PAD_B { D6 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/kiwikeebs/macro_v2/info.json b/keyboards/kiwikeebs/macro_v2/info.json index c83e861c72fb..168b3ba447f8 100644 --- a/keyboards/kiwikeebs/macro_v2/info.json +++ b/keyboards/kiwikeebs/macro_v2/info.json @@ -8,6 +8,11 @@ "pid": "0x4712", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D7", "pin_b": "D6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/kiwikey/borderland/config.h b/keyboards/kiwikey/borderland/config.h index 9a4d8403b3a1..a698476a5f58 100644 --- a/keyboards/kiwikey/borderland/config.h +++ b/keyboards/kiwikey/borderland/config.h @@ -20,9 +20,6 @@ /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F6 } - #define TAP_CODE_DELAY 10 #define RGB_DI_PIN B2 diff --git a/keyboards/kiwikey/borderland/info.json b/keyboards/kiwikey/borderland/info.json index d88a8b20bfb0..84b17c438504 100644 --- a/keyboards/kiwikey/borderland/info.json +++ b/keyboards/kiwikey/borderland/info.json @@ -8,6 +8,11 @@ "pid": "0x424C", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/knobgoblin/config.h b/keyboards/knobgoblin/config.h index 5ace53258ee7..435c727db5d8 100644 --- a/keyboards/knobgoblin/config.h +++ b/keyboards/knobgoblin/config.h @@ -21,9 +21,6 @@ #define MATRIX_ROW_PINS { D4, B6, B2, B3, B1 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } -#define ENCODERS_PAD_A { F7, F5 } -#define ENCODERS_PAD_B { F6, F4 } - #define OLED_TIMEOUT 180000 /* COL2ROW or ROW2COL */ diff --git a/keyboards/knobgoblin/info.json b/keyboards/knobgoblin/info.json index d80aef231313..c0d8de34e9cb 100644 --- a/keyboards/knobgoblin/info.json +++ b/keyboards/knobgoblin/info.json @@ -8,6 +8,12 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F7", "pin_b": "F6"}, + {"pin_a": "F5", "pin_b": "F4"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev1/config.h b/keyboards/kprepublic/bm60hsrgb_ec/rev1/config.h index 375e54504c02..8a5d4a50bc52 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev1/config.h +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev1/config.h @@ -16,11 +16,6 @@ #pragma once - -#define ENCODERS_PAD_A { F6 } -#define ENCODERS_PAD_B { F5 } -#define ENCODER_RESOLUTION 2 - /* * Keyboard Matrix Assignments * diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev1/info.json b/keyboards/kprepublic/bm60hsrgb_ec/rev1/info.json index 3e0084c1a7d9..a255a480b3e0 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev1/info.json +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev1/info.json @@ -8,6 +8,11 @@ "pid": "0xEF9C", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F5", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h index b180e2485383..b70904fae3ea 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h @@ -15,11 +15,6 @@ */ #pragma once - -#define ENCODERS_PAD_A { F1 } -#define ENCODERS_PAD_B { F4 } -#define ENCODER_RESOLUTION 2 - /* * Keyboard Matrix Assignments * diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/info.json b/keyboards/kprepublic/bm60hsrgb_ec/rev2/info.json index cb75c22dd60e..83efb7b5e771 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/info.json +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/info.json @@ -8,6 +8,11 @@ "pid": "0x1124", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "F1", "pin_b": "F4", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 3, From 00bd2babcfa8a97d5a3a6d1b901df1a09883e27d Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:34:53 +1100 Subject: [PATCH 15/31] Move encoder config to info.json, L --- keyboards/latincompass/latinpad/config.h | 3 --- keyboards/latincompass/latinpad/info.json | 6 ++++++ keyboards/latincompass/latinpadble/config.h | 3 --- keyboards/latincompass/latinpadble/info.json | 5 +++++ keyboards/leafcutterlabs/bigknob/config.h | 4 ---- keyboards/leafcutterlabs/bigknob/info.json | 5 +++++ keyboards/lily58/glow_enc/config.h | 5 ----- keyboards/lily58/glow_enc/info.json | 14 +++++++++++++- keyboards/lily58/light/config.h | 5 ----- keyboards/lily58/light/info.json | 14 +++++++++++++- keyboards/lime/rev1/config.h | 9 --------- keyboards/lime/rev1/info.json | 14 +++++++++++++- keyboards/linworks/whale75/config.h | 7 ------- keyboards/linworks/whale75/info.json | 5 +++++ keyboards/lizard_trick/tenkey_plusplus/config.h | 5 ----- keyboards/lizard_trick/tenkey_plusplus/info.json | 7 +++++++ keyboards/ll3macorn/bongopad/config.h | 4 ---- keyboards/ll3macorn/bongopad/info.json | 5 +++++ keyboards/lw67/config.h | 4 ---- keyboards/lw67/info.json | 5 +++++ keyboards/lw75/config.h | 4 ---- keyboards/lw75/info.json | 5 +++++ keyboards/lyso1/lck75/config.h | 4 ---- keyboards/lyso1/lck75/info.json | 5 +++++ 24 files changed, 87 insertions(+), 60 deletions(-) diff --git a/keyboards/latincompass/latinpad/config.h b/keyboards/latincompass/latinpad/config.h index dd7b7e584fd5..bfbdf01cd743 100644 --- a/keyboards/latincompass/latinpad/config.h +++ b/keyboards/latincompass/latinpad/config.h @@ -77,6 +77,3 @@ along with this program. If not, see .*/ #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define OLED_FONT_H "./lib/glcdfont.c" - -#define ENCODERS_PAD_A { B4, B5 } -#define ENCODERS_PAD_B { B2, B6 } diff --git a/keyboards/latincompass/latinpad/info.json b/keyboards/latincompass/latinpad/info.json index 4ab11d8cfbae..b2f4199dfd0c 100644 --- a/keyboards/latincompass/latinpad/info.json +++ b/keyboards/latincompass/latinpad/info.json @@ -8,6 +8,12 @@ "pid": "0x6C70", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B2"}, + {"pin_a": "B5", "pin_b": "B6"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/latincompass/latinpadble/config.h b/keyboards/latincompass/latinpadble/config.h index 195ce7b3d989..fe0ab9999b7b 100644 --- a/keyboards/latincompass/latinpadble/config.h +++ b/keyboards/latincompass/latinpadble/config.h @@ -84,7 +84,4 @@ along with this program. If not, see .*/ #define OLED_FONT_H "./lib/glcdfont.c" -#define ENCODERS_PAD_A { C7 } -#define ENCODERS_PAD_B { F7 } - #define VIA_HAS_BROKEN_KEYCODES diff --git a/keyboards/latincompass/latinpadble/info.json b/keyboards/latincompass/latinpadble/info.json index ed82794f821b..266f09d8a06b 100644 --- a/keyboards/latincompass/latinpadble/info.json +++ b/keyboards/latincompass/latinpadble/info.json @@ -8,6 +8,11 @@ "pid": "0x7C98", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C7", "pin_b": "F7"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/leafcutterlabs/bigknob/config.h b/keyboards/leafcutterlabs/bigknob/config.h index 4615f2707147..3c6bf4e8a99b 100644 --- a/keyboards/leafcutterlabs/bigknob/config.h +++ b/keyboards/leafcutterlabs/bigknob/config.h @@ -17,10 +17,6 @@ along with this program. If not, see . #pragma once -/* rotary encoder 1,2,3 closest to usb port is 0*/ -#define ENCODERS_PAD_A { D0} -#define ENCODERS_PAD_B { D2} - /* ws2812 RGB LED */ #define RGB_DI_PIN C7 //D3 - underglow C7 - backlight #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/leafcutterlabs/bigknob/info.json b/keyboards/leafcutterlabs/bigknob/info.json index 2a8830c308cc..55d5fe13ee93 100644 --- a/keyboards/leafcutterlabs/bigknob/info.json +++ b/keyboards/leafcutterlabs/bigknob/info.json @@ -8,6 +8,11 @@ "pid": "0x0007", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D2"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/lily58/glow_enc/config.h b/keyboards/lily58/glow_enc/config.h index 443139c82465..d89148dbbf50 100644 --- a/keyboards/lily58/glow_enc/config.h +++ b/keyboards/lily58/glow_enc/config.h @@ -31,8 +31,3 @@ along with this program. If not, see . #define RGBLED_SPLIT { 36, 36 } #define RGBLIGHT_SPLIT #define RGBLIGHT_LIMIT_VAL 120 - -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { D4 } -#define ENCODERS_PAD_A_RIGHT { D4 } -#define ENCODERS_PAD_B_RIGHT { F5 } diff --git a/keyboards/lily58/glow_enc/info.json b/keyboards/lily58/glow_enc/info.json index ef53c7f2d5bd..bc2eae23da86 100644 --- a/keyboards/lily58/glow_enc/info.json +++ b/keyboards/lily58/glow_enc/info.json @@ -8,8 +8,20 @@ "pid": "0x0059", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "D4"} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "D4", "pin_b": "F5"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/lily58/light/config.h b/keyboards/lily58/light/config.h index 0b11be778a6d..3a0780e0a662 100644 --- a/keyboards/lily58/light/config.h +++ b/keyboards/lily58/light/config.h @@ -29,8 +29,3 @@ along with this program. If not, see . #define RGBLED_NUM 70 #define RGBLIGHT_SPLIT #define RGBLIGHT_LIMIT_VAL 120 - -#define ENCODERS_PAD_A { F4 } -#define ENCODERS_PAD_B { F5 } -#define ENCODERS_PAD_A_RIGHT { F5 } -#define ENCODERS_PAD_B_RIGHT { F4 } diff --git a/keyboards/lily58/light/info.json b/keyboards/lily58/light/info.json index 18e16cd46938..82e9affbd043 100644 --- a/keyboards/lily58/light/info.json +++ b/keyboards/lily58/light/info.json @@ -8,8 +8,20 @@ "pid": "0x4C4C", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/lime/rev1/config.h b/keyboards/lime/rev1/config.h index 8ca3fd28b967..841a7bb76461 100644 --- a/keyboards/lime/rev1/config.h +++ b/keyboards/lime/rev1/config.h @@ -23,15 +23,6 @@ #define TAPPING_TERM 100 -/* encoder support */ -#ifdef ENCODER_ENABLE -# 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 2 -#endif - /* joystick support */ #ifdef JOYSTICK_ENABLE # define JOYSTICK_AXIS_COUNT 2 diff --git a/keyboards/lime/rev1/info.json b/keyboards/lime/rev1/info.json index 4daceb8e61f4..fb05828f6d5f 100644 --- a/keyboards/lime/rev1/info.json +++ b/keyboards/lime/rev1/info.json @@ -8,8 +8,20 @@ "pid": "0x2784", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4", "resolution": 2} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5", "resolution": 2} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/linworks/whale75/config.h b/keyboards/linworks/whale75/config.h index b2da9c02459d..8944320355c3 100644 --- a/keyboards/linworks/whale75/config.h +++ b/keyboards/linworks/whale75/config.h @@ -48,11 +48,4 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - -/* Rotary encoder - set the resolution fitting your encoder. -Most will need a value of 4. If 1 encoder click results in 2 keycodes sent -double the value. If you need 2 clicks for 1 keycode, half it */ -#define ENCODER_RESOLUTION 2 -#define ENCODERS_PAD_A { A15 } -#define ENCODERS_PAD_B { A14 } #define TAP_CODE_DELAY 10 diff --git a/keyboards/linworks/whale75/info.json b/keyboards/linworks/whale75/info.json index 7de9e12764d3..ba8a7e011c06 100644 --- a/keyboards/linworks/whale75/info.json +++ b/keyboards/linworks/whale75/info.json @@ -7,6 +7,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A15", "pin_b": "A14", "resolution": 2} + ] + }, "indicators": { "caps_lock": "A9", "num_lock": "A8", diff --git a/keyboards/lizard_trick/tenkey_plusplus/config.h b/keyboards/lizard_trick/tenkey_plusplus/config.h index ec3b2e6c6dab..c2d33c6ae7d3 100644 --- a/keyboards/lizard_trick/tenkey_plusplus/config.h +++ b/keyboards/lizard_trick/tenkey_plusplus/config.h @@ -32,11 +32,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B7, D4, B5, B6, C6, C7 } #define MATRIX_COL_PINS { D5, D3, D2, F7 } -#define ENCODERS_PAD_A \ - { B4, F0, F4 } -#define ENCODERS_PAD_B \ - { D7, E6, F1 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lizard_trick/tenkey_plusplus/info.json b/keyboards/lizard_trick/tenkey_plusplus/info.json index 376f2dcf60fe..eb8ef5e48d83 100644 --- a/keyboards/lizard_trick/tenkey_plusplus/info.json +++ b/keyboards/lizard_trick/tenkey_plusplus/info.json @@ -8,6 +8,13 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "D7"}, + {"pin_a": "F0", "pin_b": "E6"}, + {"pin_a": "F4", "pin_b": "F1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/ll3macorn/bongopad/config.h b/keyboards/ll3macorn/bongopad/config.h index a165b3cb9d75..1ea347bfd61b 100644 --- a/keyboards/ll3macorn/bongopad/config.h +++ b/keyboards/ll3macorn/bongopad/config.h @@ -13,10 +13,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* encoders */ -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B3 } - /* misc */ #define LAYER_STATE_8BIT #define NO_ACTION_TAPPING diff --git a/keyboards/ll3macorn/bongopad/info.json b/keyboards/ll3macorn/bongopad/info.json index faed6f473caf..f24e1a3f6f0f 100644 --- a/keyboards/ll3macorn/bongopad/info.json +++ b/keyboards/ll3macorn/bongopad/info.json @@ -8,6 +8,11 @@ "pid": "0x2949", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B3"} + ] + }, "bootmagic": { "matrix": [1, 0] }, diff --git a/keyboards/lw67/config.h b/keyboards/lw67/config.h index 0d08408c5cfd..4ca126198239 100644 --- a/keyboards/lw67/config.h +++ b/keyboards/lw67/config.h @@ -21,10 +21,6 @@ #define MATRIX_ROW_PINS { E6, B7, D0, D1, D2 } #define MATRIX_COL_PINS { D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, B0, B1 } -/*ENCODER*/ -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F1 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lw67/info.json b/keyboards/lw67/info.json index 29579215dbb3..f443702d69d6 100644 --- a/keyboards/lw67/info.json +++ b/keyboards/lw67/info.json @@ -8,6 +8,11 @@ "pid": "0x9998", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F0", "pin_b": "F1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts":{ diff --git a/keyboards/lw75/config.h b/keyboards/lw75/config.h index 02e5be2413c7..77a51635b450 100644 --- a/keyboards/lw75/config.h +++ b/keyboards/lw75/config.h @@ -7,10 +7,6 @@ #define MATRIX_ROW_PINS { E6, B7, D0, D1, D2, B1 } #define MATRIX_COL_PINS { D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, B0, B2 } -/*ENCODER*/ -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F1 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lw75/info.json b/keyboards/lw75/info.json index ef55732d233f..de5f70ca146a 100644 --- a/keyboards/lw75/info.json +++ b/keyboards/lw75/info.json @@ -8,6 +8,11 @@ "pid": "0x1111", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F0", "pin_b": "F1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts":{ diff --git a/keyboards/lyso1/lck75/config.h b/keyboards/lyso1/lck75/config.h index cad5a9321072..110d7ecfe9d4 100644 --- a/keyboards/lyso1/lck75/config.h +++ b/keyboards/lyso1/lck75/config.h @@ -31,10 +31,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C2, C3, C7, C4, C6, C5 } #define MATRIX_COL_PINS { A0, B0, A1, B1, A2, B2, A3, B3, A4, B4, A5, A6, A7, D7, D6, D5 } -#define ENCODERS_PAD_B { D1 } -#define ENCODERS_PAD_A { D0 } -#define ENCODER_RESOLUTION 2 //default/suggested - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lyso1/lck75/info.json b/keyboards/lyso1/lck75/info.json index 025f1fe168d5..f3102475d920 100644 --- a/keyboards/lyso1/lck75/info.json +++ b/keyboards/lyso1/lck75/info.json @@ -8,6 +8,11 @@ "pid": "0x6163", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0", "resolution": 2} + ] + }, "processor": "atmega32a", "bootloader": "usbasploader", "layouts": { From 1f81fbc1db6a5da696461edbdb6a1bd74ca0b24a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:35:00 +1100 Subject: [PATCH 16/31] Move encoder config to info.json, M --- keyboards/macro1/config.h | 4 ---- keyboards/macro1/info.json | 5 +++++ keyboards/macro3/config.h | 9 --------- keyboards/macro3/info.json | 6 ++++++ keyboards/macrocat/config.h | 4 ---- keyboards/macrocat/info.json | 5 +++++ keyboards/makrosu/config.h | 2 -- keyboards/makrosu/info.json | 5 +++++ keyboards/manyboard/macro/config.h | 4 ---- keyboards/manyboard/macro/info.json | 5 +++++ keyboards/marksard/leftover30/config.h | 6 ------ keyboards/marksard/leftover30/info.json | 5 +++++ keyboards/matthewdias/m3n3van/config.h | 2 -- keyboards/matthewdias/m3n3van/info.json | 5 +++++ keyboards/maxr1998/pulse4k/config.h | 4 ---- keyboards/maxr1998/pulse4k/info.json | 6 ++++++ keyboards/mb44/config.h | 4 ---- keyboards/mb44/info.json | 5 +++++ keyboards/mechanickeys/undead60m/config.h | 4 ---- keyboards/mechanickeys/undead60m/info.json | 5 +++++ keyboards/mechlovin/adelais/rgb_led/rev2/config.h | 3 --- keyboards/mechlovin/adelais/rgb_led/rev2/info.json | 5 +++++ keyboards/mechlovin/adelais/rgb_led/rev3/config.h | 5 ----- keyboards/mechlovin/adelais/rgb_led/rev3/info.json | 5 +++++ .../adelais/standard_led/arm/rev3/config.h | 3 --- .../adelais/standard_led/arm/rev3/info.json | 7 +++++++ .../adelais/standard_led/arm/rev4/config.h | 3 --- .../adelais/standard_led/arm/rev4/info.json | 7 +++++++ .../adelais/standard_led/avr/rev1/config.h | 3 --- .../adelais/standard_led/avr/rev1/info.json | 7 +++++++ keyboards/mechlovin/foundation/config.h | 4 ---- keyboards/mechlovin/foundation/info.json | 5 +++++ keyboards/mechlovin/hex6c/config.h | 3 --- keyboards/mechlovin/hex6c/info.json | 5 +++++ .../mechlovin/zed65/no_backlight/retro66/config.h | 5 ----- .../mechlovin/zed65/no_backlight/retro66/info.json | 6 ++++++ keyboards/mechwild/bde/rev2/config.h | 4 ---- keyboards/mechwild/bde/rev2/info.json | 5 +++++ keyboards/mechwild/clunker/config.h | 3 --- keyboards/mechwild/clunker/info.json | 5 +++++ keyboards/mechwild/mercutio/config.h | 4 ---- keyboards/mechwild/mercutio/info.json | 5 +++++ keyboards/mechwild/mokulua/mirrored/config.h | 4 ---- keyboards/mechwild/mokulua/mirrored/info.json | 5 +++++ keyboards/mechwild/mokulua/standard/config.h | 4 ---- keyboards/mechwild/mokulua/standard/info.json | 5 +++++ keyboards/mechwild/murphpad/config.h | 4 ---- keyboards/mechwild/murphpad/info.json | 6 ++++++ keyboards/mechwild/obe/config.h | 4 ---- keyboards/mechwild/obe/info.json | 5 +++++ keyboards/mechwild/puckbuddy/config.h | 4 ---- keyboards/mechwild/puckbuddy/info.json | 6 ++++++ keyboards/mechwild/waka60/config.h | 4 ---- keyboards/mechwild/waka60/info.json | 5 +++++ keyboards/meletrix/zoom65/config.h | 6 ------ keyboards/meletrix/zoom65/info.json | 5 +++++ keyboards/meletrix/zoom65_lite/config.h | 6 ------ keyboards/meletrix/zoom65_lite/info.json | 5 +++++ keyboards/merge/iso_macro/config.h | 4 ---- keyboards/merge/iso_macro/info.json | 6 ++++++ keyboards/merge/uc1/config.h | 3 --- keyboards/merge/uc1/info.json | 5 +++++ keyboards/merge/um70/config.h | 3 --- keyboards/merge/um70/info.json | 5 +++++ keyboards/merge/um80/config.h | 3 --- keyboards/merge/um80/info.json | 5 +++++ keyboards/merge/uma/config.h | 3 --- keyboards/merge/uma/info.json | 5 +++++ keyboards/metamechs/timberwolf/config.h | 10 ---------- keyboards/metamechs/timberwolf/info.json | 5 +++++ keyboards/mexsistor/ludmila/config.h | 5 ----- keyboards/mexsistor/ludmila/info.json | 5 +++++ keyboards/millipad/config.h | 5 ----- keyboards/millipad/info.json | 5 +++++ keyboards/mincedshon/ecila/config.h | 6 ------ keyboards/mini_elixivy/config.h | 2 -- keyboards/mini_elixivy/info.json | 5 +++++ keyboards/mini_ten_key_plus/config.h | 4 ---- keyboards/mini_ten_key_plus/info.json | 5 +++++ keyboards/minimacro5/config.h | 6 ------ keyboards/minimacro5/info.json | 9 +++++++++ keyboards/misonoworks/karina/config.h | 5 ----- keyboards/misonoworks/karina/info.json | 6 ++++++ keyboards/mixi/config.h | 3 --- keyboards/mixi/info.json | 6 ++++++ keyboards/mk65/config.h | 5 ----- keyboards/mk65/info.json | 5 +++++ keyboards/ml/gas75/config.h | 4 ---- keyboards/ml/gas75/info.json | 5 +++++ keyboards/mlego/m48/rev1/config.h | 7 ------- keyboards/mlego/m48/rev1/info.json | 5 +++++ keyboards/mlego/m60/rev1/config.h | 8 -------- keyboards/mlego/m60/rev1/info.json | 5 +++++ keyboards/mlego/m60_split/rev1/config.h | 7 ------- keyboards/mlego/m60_split/rev1/info.json | 5 +++++ keyboards/mlego/m60_split/rev2/config.h | 8 -------- keyboards/mlego/m60_split/rev2/info.json | 5 +++++ keyboards/mlego/m65/rev1/config.h | 5 ----- keyboards/mlego/m65/rev1/info.json | 5 +++++ keyboards/mlego/m65/rev2/config.h | 5 ----- keyboards/mlego/m65/rev2/info.json | 5 +++++ keyboards/mlego/m65/rev3/config.h | 7 ------- keyboards/mlego/m65/rev3/info.json | 5 +++++ keyboards/mlego/m65/rev4/config.h | 7 ------- keyboards/mlego/m65/rev4/info.json | 5 +++++ keyboards/monarch/config.h | 5 ----- keyboards/monarch/info.json | 5 +++++ keyboards/montsinger/rebound/rev2/config.h | 3 --- keyboards/montsinger/rebound/rev2/info.json | 5 +++++ keyboards/montsinger/rebound/rev3/config.h | 3 --- keyboards/montsinger/rebound/rev3/info.json | 5 +++++ keyboards/montsinger/rebound/rev4/config.h | 3 --- keyboards/montsinger/rebound/rev4/info.json | 5 +++++ keyboards/murcielago/info.json | 14 +++++++++++++- keyboards/murcielago/rev1/config.h | 6 ------ keyboards/mwstudio/alicekk/config.h | 3 --- keyboards/mwstudio/alicekk/info.json | 5 +++++ keyboards/mwstudio/mw65_black/config.h | 3 --- keyboards/mwstudio/mw65_black/info.json | 5 +++++ keyboards/mwstudio/mw65_rgb/config.h | 4 ---- keyboards/mwstudio/mw65_rgb/info.json | 5 +++++ keyboards/mwstudio/mw75/config.h | 3 --- keyboards/mwstudio/mw75/info.json | 5 +++++ keyboards/mwstudio/mw75r2/config.h | 3 --- keyboards/mwstudio/mw75r2/info.json | 5 +++++ 125 files changed, 336 insertions(+), 281 deletions(-) delete mode 100644 keyboards/macro3/config.h diff --git a/keyboards/macro1/config.h b/keyboards/macro1/config.h index 46618b5b1aac..a03f212f374c 100644 --- a/keyboards/macro1/config.h +++ b/keyboards/macro1/config.h @@ -21,10 +21,6 @@ #define MATRIX_ROW_PINS { E6, B7, D0, D1, D2, B3 } #define MATRIX_COL_PINS { D3, D4, D6, D7 } -/*ENCODER*/ -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F1 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/macro1/info.json b/keyboards/macro1/info.json index c79e7bd43895..ae4de403109b 100644 --- a/keyboards/macro1/info.json +++ b/keyboards/macro1/info.json @@ -8,6 +8,11 @@ "pid": "0x9999", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F0", "pin_b": "F1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts":{ diff --git a/keyboards/macro3/config.h b/keyboards/macro3/config.h deleted file mode 100644 index 714f796f48fe..000000000000 --- a/keyboards/macro3/config.h +++ /dev/null @@ -1,9 +0,0 @@ -/* Copyright 2020 David Philip Barr <@davidphilipbarr> - * Copyright 2021 @filterpaper - * SPDX-License-Identifier: GPL-2.0+ - */ - -#pragma once - -#define ENCODERS_PAD_A { D2, F7 } -#define ENCODERS_PAD_B { D3, F6 } diff --git a/keyboards/macro3/info.json b/keyboards/macro3/info.json index 89720d9b70d5..780dfca3036f 100644 --- a/keyboards/macro3/info.json +++ b/keyboards/macro3/info.json @@ -8,6 +8,12 @@ "pid": "0x3388", "device_version": "0.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D3"}, + {"pin_a": "F7", "pin_b": "F6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "matrix_pins": { diff --git a/keyboards/macrocat/config.h b/keyboards/macrocat/config.h index f74f3d90552b..0d14bca0ea42 100644 --- a/keyboards/macrocat/config.h +++ b/keyboards/macrocat/config.h @@ -3,8 +3,4 @@ #pragma once - -/* rotary encoder */ -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } #define ENCODER_SWITCH B7 diff --git a/keyboards/macrocat/info.json b/keyboards/macrocat/info.json index 421f1283e13d..47dbbc6d9a06 100644 --- a/keyboards/macrocat/info.json +++ b/keyboards/macrocat/info.json @@ -24,6 +24,11 @@ "pid": "0x8086", "vid": "0x2022" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2"} + ] + }, "layout_aliases": { "LAYOUT_numpad_4x4": "LAYOUT_ortho_4x4" }, diff --git a/keyboards/makrosu/config.h b/keyboards/makrosu/config.h index b07d3842a6b8..c00353db8901 100644 --- a/keyboards/makrosu/config.h +++ b/keyboards/makrosu/config.h @@ -21,8 +21,6 @@ #define MATRIX_ROW_PINS { B6 } #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5} -#define ENCODERS_PAD_A { E6 } -#define ENCODERS_PAD_B { D1 } #define TAP_CODE_DELAY 10 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/makrosu/info.json b/keyboards/makrosu/info.json index 9474d6c8041e..77974305e571 100644 --- a/keyboards/makrosu/info.json +++ b/keyboards/makrosu/info.json @@ -8,6 +8,11 @@ "pid": "0x8585", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E6", "pin_b": "D1"} + ] + }, "bootmagic": { "matrix": [0, 5] }, diff --git a/keyboards/manyboard/macro/config.h b/keyboards/manyboard/macro/config.h index c21ce974cbce..1839a1091d1b 100644 --- a/keyboards/manyboard/macro/config.h +++ b/keyboards/manyboard/macro/config.h @@ -21,10 +21,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D0, D1, D2, D3 } #define MATRIX_COL_PINS { D4, D5, D6, D7 } -/*Encoder Pins*/ -#define ENCODERS_PAD_A { C6 } -#define ENCODERS_PAD_B { C7 } - /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/manyboard/macro/info.json b/keyboards/manyboard/macro/info.json index f781e92265b6..cdf40f680156 100644 --- a/keyboards/manyboard/macro/info.json +++ b/keyboards/manyboard/macro/info.json @@ -8,6 +8,11 @@ "pid": "0x0015", "device_version": "1.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "C7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/marksard/leftover30/config.h b/keyboards/marksard/leftover30/config.h index ed8192061695..bf7aa7f198df 100644 --- a/keyboards/marksard/leftover30/config.h +++ b/keyboards/marksard/leftover30/config.h @@ -17,12 +17,6 @@ along with this program. If not, see . #pragma once - -/* Encoder */ -#define ENCODERS_PAD_A { F4 } -#define ENCODERS_PAD_B { F5 } -// #define ENCODER_DIRECTION_FLIP - /* * Keyboard Matrix Assignments * diff --git a/keyboards/marksard/leftover30/info.json b/keyboards/marksard/leftover30/info.json index 7c4a6b434500..39de1d6bda0d 100644 --- a/keyboards/marksard/leftover30/info.json +++ b/keyboards/marksard/leftover30/info.json @@ -8,6 +8,11 @@ "pid": "0xDFA8", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/matthewdias/m3n3van/config.h b/keyboards/matthewdias/m3n3van/config.h index 13d647105a6d..81acfef55365 100644 --- a/keyboards/matthewdias/m3n3van/config.h +++ b/keyboards/matthewdias/m3n3van/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . /* m3n3van PCB default pin-out */ #define MATRIX_ROW_PINS { B5, B6, C6, C7 } #define MATRIX_COL_PINS { F4, F5, F6, F1, F7, F0, E6, D3, D0, D1, D2, D4, D6 } -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { D7 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/matthewdias/m3n3van/info.json b/keyboards/matthewdias/m3n3van/info.json index bef63b4de032..ffe44159a0fe 100644 --- a/keyboards/matthewdias/m3n3van/info.json +++ b/keyboards/matthewdias/m3n3van/info.json @@ -8,6 +8,11 @@ "pid": "0x2323", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "D7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/maxr1998/pulse4k/config.h b/keyboards/maxr1998/pulse4k/config.h index 6df8d67d0227..3756899498e2 100644 --- a/keyboards/maxr1998/pulse4k/config.h +++ b/keyboards/maxr1998/pulse4k/config.h @@ -25,10 +25,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Rotary encoders */ -#define ENCODERS_PAD_A { D2, F6 } -#define ENCODERS_PAD_B { D3, F5 } - /* Combo setup */ #define COMBO_COUNT 1 #define COMBO_TERM 150 diff --git a/keyboards/maxr1998/pulse4k/info.json b/keyboards/maxr1998/pulse4k/info.json index 449a3fc0a522..9db0307940a1 100644 --- a/keyboards/maxr1998/pulse4k/info.json +++ b/keyboards/maxr1998/pulse4k/info.json @@ -8,6 +8,12 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D3"}, + {"pin_a": "F6", "pin_b": "F5"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/mb44/config.h b/keyboards/mb44/config.h index 776c1311db3c..365fed73401f 100644 --- a/keyboards/mb44/config.h +++ b/keyboards/mb44/config.h @@ -33,7 +33,3 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - -/*Encoder Definition*/ -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } diff --git a/keyboards/mb44/info.json b/keyboards/mb44/info.json index dce66f746a17..865f05674f80 100644 --- a/keyboards/mb44/info.json +++ b/keyboards/mb44/info.json @@ -8,6 +8,11 @@ "pid": "0x6D62", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/mechanickeys/undead60m/config.h b/keyboards/mechanickeys/undead60m/config.h index bc88e83ddef2..c86a3af0f123 100644 --- a/keyboards/mechanickeys/undead60m/config.h +++ b/keyboards/mechanickeys/undead60m/config.h @@ -49,7 +49,3 @@ #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE #endif - -/* Rotary encoder */ -#define ENCODERS_PAD_A { F6 } -#define ENCODERS_PAD_B { F5 } diff --git a/keyboards/mechanickeys/undead60m/info.json b/keyboards/mechanickeys/undead60m/info.json index c525db642028..9bee50289c54 100644 --- a/keyboards/mechanickeys/undead60m/info.json +++ b/keyboards/mechanickeys/undead60m/info.json @@ -8,6 +8,11 @@ "pid": "0x3C4D", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F5"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h index 2e82c30b4094..d9d75a4b9e24 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h @@ -91,7 +91,4 @@ #define RGB_MATRIX_DISABLE_KEYCODES -#define ENCODERS_PAD_A { A4 } -#define ENCODERS_PAD_B { A3 } - #define TAP_CODE_DELAY 10 diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/info.json b/keyboards/mechlovin/adelais/rgb_led/rev2/info.json index b83a4828e3e1..7dcd0f1765fa 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/info.json +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/info.json @@ -3,6 +3,11 @@ "usb": { "pid": "0xAEC2" }, + "encoder": { + "rotary": [ + {"pin_a": "A4", "pin_b": "A3"} + ] + }, "processor": "STM32F303", "board": "QMK_PROTON_C", "bootloader": "stm32-dfu", diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h index 823a92670098..7457fd50a763 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h @@ -113,9 +113,4 @@ along with this program. If not, see . #endif -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A { B12 } -#define ENCODERS_PAD_B { B13 } - #define TAP_CODE_DELAY 10 -#endif diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/info.json b/keyboards/mechlovin/adelais/rgb_led/rev3/info.json index 89bf9abe9bb9..3f83750e3a85 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/info.json +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/info.json @@ -3,6 +3,11 @@ "usb": { "pid": "0xAEC3" }, + "encoder": { + "rotary": [ + {"pin_a": "B12", "pin_b": "B13"} + ] + }, "processor": "STM32F103", "bootloader": "stm32duino", "indicators": { diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h b/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h index 0c95c05ab196..254d20403810 100644 --- a/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h @@ -1,6 +1,3 @@ #pragma once -#define ENCODERS_PAD_A { A6, A4, B7 } -#define ENCODERS_PAD_B { A5, A3, B6 } - #define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev3/info.json b/keyboards/mechlovin/adelais/standard_led/arm/rev3/info.json index a8d21313a22e..60d20c4a29f9 100644 --- a/keyboards/mechlovin/adelais/standard_led/arm/rev3/info.json +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev3/info.json @@ -2,6 +2,13 @@ "usb": { "pid": "0xAD02" }, + "encoder": { + "rotary": [ + {"pin_a": "A6", "pin_b": "A5"}, + {"pin_a": "A4", "pin_b": "A3"}, + {"pin_a": "B7", "pin_b": "B6"} + ] + }, "processor": "STM32F303", "board": "QMK_PROTON_C", "bootloader": "stm32-dfu" diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h b/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h index c8d13c75324e..7905be189159 100644 --- a/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h @@ -16,7 +16,4 @@ along with this program. If not, see . */ #pragma once -#define ENCODERS_PAD_A { A6, A4, B7 } -#define ENCODERS_PAD_B { A5, A3, B6 } - #define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/info.json b/keyboards/mechlovin/adelais/standard_led/arm/rev4/info.json index f4c096143b44..925b7cd213ee 100644 --- a/keyboards/mechlovin/adelais/standard_led/arm/rev4/info.json +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/info.json @@ -1,5 +1,12 @@ { "usb": { "pid": "0xAD03" + }, + "encoder": { + "rotary": [ + {"pin_a": "A6", "pin_b": "A5"}, + {"pin_a": "A4", "pin_b": "A3"}, + {"pin_a": "B7", "pin_b": "B6"} + ] } } diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h index 1e55c8583c5e..66e9baaf1a1c 100644 --- a/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h @@ -48,7 +48,4 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define ENCODERS_PAD_A { D3, D5, C7 } -#define ENCODERS_PAD_B { D2, B6, C6 } - #define TAP_CODE_DELAY 10 diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/info.json b/keyboards/mechlovin/adelais/standard_led/avr/rev1/info.json index f571ebab510b..27e9edb18f6c 100644 --- a/keyboards/mechlovin/adelais/standard_led/avr/rev1/info.json +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/info.json @@ -3,6 +3,13 @@ "usb": { "pid": "0xAD04" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2"}, + {"pin_a": "D5", "pin_b": "B6"}, + {"pin_a": "C7", "pin_b": "C6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "indicators": { diff --git a/keyboards/mechlovin/foundation/config.h b/keyboards/mechlovin/foundation/config.h index 0c8d813cfa98..951eab595b5b 100644 --- a/keyboards/mechlovin/foundation/config.h +++ b/keyboards/mechlovin/foundation/config.h @@ -55,8 +55,4 @@ along with this program. If not, see . # define RGBLIGHT_EFFECT_TWINKLE #endif -// Encoder pins -#define ENCODERS_PAD_A { C13 } -#define ENCODERS_PAD_B { C14 } - #define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/mechlovin/foundation/info.json b/keyboards/mechlovin/foundation/info.json index 38f9cace0817..bb7491ff191e 100644 --- a/keyboards/mechlovin/foundation/info.json +++ b/keyboards/mechlovin/foundation/info.json @@ -8,6 +8,11 @@ "pid": "0x0180", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "C13", "pin_b": "C14"} + ] + }, "indicators": { "caps_lock": "A1", "on_state": 0 diff --git a/keyboards/mechlovin/hex6c/config.h b/keyboards/mechlovin/hex6c/config.h index afdb6c047f43..939d1449847e 100644 --- a/keyboards/mechlovin/hex6c/config.h +++ b/keyboards/mechlovin/hex6c/config.h @@ -39,9 +39,6 @@ along with this program. If not, see . #define BACKLIGHT_PWM_DRIVER PWMD3 #define BACKLIGHT_PWM_CHANNEL 3 -#define ENCODERS_PAD_A { A15 } -#define ENCODERS_PAD_B { A2 } - #define TAP_CODE_DELAY 10 #define WEAR_LEVELING_BACKING_SIZE 4096 diff --git a/keyboards/mechlovin/hex6c/info.json b/keyboards/mechlovin/hex6c/info.json index c076b7198b4d..2c08542a16b7 100644 --- a/keyboards/mechlovin/hex6c/info.json +++ b/keyboards/mechlovin/hex6c/info.json @@ -8,6 +8,11 @@ "pid": "0x6C01", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A15", "pin_b": "A2"} + ] + }, "indicators": { "caps_lock": "A4", "num_lock": "A3", diff --git a/keyboards/mechlovin/zed65/no_backlight/retro66/config.h b/keyboards/mechlovin/zed65/no_backlight/retro66/config.h index 1183d645e58e..4739a7c2b14f 100644 --- a/keyboards/mechlovin/zed65/no_backlight/retro66/config.h +++ b/keyboards/mechlovin/zed65/no_backlight/retro66/config.h @@ -21,9 +21,4 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B13, B14, A8, A1, A0 } #define MATRIX_COL_PINS { B11, B12, B10, B2, B1, B0, A7, A6, A5, A4, A3, A2, B3, A15, B5 } -// Number of encoders - -#define ENCODERS_PAD_A { B4, B6 } -#define ENCODERS_PAD_B { B8, B9 } - #define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/mechlovin/zed65/no_backlight/retro66/info.json b/keyboards/mechlovin/zed65/no_backlight/retro66/info.json index d2e9604146a4..f14d88910bf2 100644 --- a/keyboards/mechlovin/zed65/no_backlight/retro66/info.json +++ b/keyboards/mechlovin/zed65/no_backlight/retro66/info.json @@ -8,6 +8,12 @@ "pid": "0x6601", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B8"}, + {"pin_a": "B6", "pin_b": "B9"} + ] + }, "indicators": { "caps_lock": "C14" }, diff --git a/keyboards/mechwild/bde/rev2/config.h b/keyboards/mechwild/bde/rev2/config.h index 98077a692f99..0d43d53bcd61 100644 --- a/keyboards/mechwild/bde/rev2/config.h +++ b/keyboards/mechwild/bde/rev2/config.h @@ -17,8 +17,4 @@ along with this program. If not, see . #pragma once -/* Encoder pins */ -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D3 } - #define OLED_FONT_H "keyboards/mechwild/bde/lib/rev2.c" diff --git a/keyboards/mechwild/bde/rev2/info.json b/keyboards/mechwild/bde/rev2/info.json index 29ddb0e01767..4d27c538951d 100644 --- a/keyboards/mechwild/bde/rev2/info.json +++ b/keyboards/mechwild/bde/rev2/info.json @@ -4,6 +4,11 @@ "pid": "0x170A", "device_version": "1.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D3"} + ] + }, "matrix_pins": { "rows":[ "C6", "D7", "B4", "D4", "E6", "B2" ], "cols": ["B3", "B1", "F7", "F6", "F5", "F4", "B5" ] diff --git a/keyboards/mechwild/clunker/config.h b/keyboards/mechwild/clunker/config.h index 8e2b3a7c0a47..62caa25bb36b 100644 --- a/keyboards/mechwild/clunker/config.h +++ b/keyboards/mechwild/clunker/config.h @@ -19,7 +19,4 @@ //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D3 } - #define SOLENOID_PIN F4 diff --git a/keyboards/mechwild/clunker/info.json b/keyboards/mechwild/clunker/info.json index cc9b8a1c5949..89083afeb22a 100644 --- a/keyboards/mechwild/clunker/info.json +++ b/keyboards/mechwild/clunker/info.json @@ -25,6 +25,11 @@ "pid": "0x1711", "vid": "0x6D77" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D3"} + ] + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/mechwild/mercutio/config.h b/keyboards/mechwild/mercutio/config.h index d6b31440e712..070fe36eb7a2 100755 --- a/keyboards/mechwild/mercutio/config.h +++ b/keyboards/mechwild/mercutio/config.h @@ -22,10 +22,6 @@ #define MATRIX_ROW_PINS { D0, D1, D4, C3, C0, C1, C2} #define MATRIX_COL_PINS { B0, D7, D6, D5, B1, B2, B3} -/* encoder pins */ -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } - #define TAP_CODE_DELAY 10 /* COL2ROW or ROW2COL */ diff --git a/keyboards/mechwild/mercutio/info.json b/keyboards/mechwild/mercutio/info.json index b0596e76e5b0..98c815c6a804 100644 --- a/keyboards/mechwild/mercutio/info.json +++ b/keyboards/mechwild/mercutio/info.json @@ -8,6 +8,11 @@ "pid": "0x1703", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "processor": "atmega328p", "bootloader": "usbasploader", "layouts": { diff --git a/keyboards/mechwild/mokulua/mirrored/config.h b/keyboards/mechwild/mokulua/mirrored/config.h index cc8980dd014b..92a8dfa3234a 100644 --- a/keyboards/mechwild/mokulua/mirrored/config.h +++ b/keyboards/mechwild/mokulua/mirrored/config.h @@ -8,10 +8,6 @@ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } -/* Encoder pins */ -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { B2 } - #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/mokulua/mirrored/info.json b/keyboards/mechwild/mokulua/mirrored/info.json index ea140fca0ee2..29d2497cc116 100644 --- a/keyboards/mechwild/mokulua/mirrored/info.json +++ b/keyboards/mechwild/mokulua/mirrored/info.json @@ -8,6 +8,11 @@ "pid": "0x170C", "device_version": "1.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "B2"} + ] + }, "split": { "soft_serial_pin": "D3" }, diff --git a/keyboards/mechwild/mokulua/standard/config.h b/keyboards/mechwild/mokulua/standard/config.h index 443341a33cce..b720c271b2a0 100644 --- a/keyboards/mechwild/mokulua/standard/config.h +++ b/keyboards/mechwild/mokulua/standard/config.h @@ -8,10 +8,6 @@ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } -/* Encoder pins */ -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { B2 } - #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/mokulua/standard/info.json b/keyboards/mechwild/mokulua/standard/info.json index 0fd80e4c888d..d3451698f6cb 100644 --- a/keyboards/mechwild/mokulua/standard/info.json +++ b/keyboards/mechwild/mokulua/standard/info.json @@ -8,6 +8,11 @@ "pid": "0x170B", "device_version": "1.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "B2"} + ] + }, "split": { "soft_serial_pin": "D3" }, diff --git a/keyboards/mechwild/murphpad/config.h b/keyboards/mechwild/murphpad/config.h index 3b0d3981e8ad..d3158c330661 100644 --- a/keyboards/mechwild/murphpad/config.h +++ b/keyboards/mechwild/murphpad/config.h @@ -22,10 +22,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F5, B2, B3, B1, F7, F6 } #define MATRIX_COL_PINS { B5, D7, C6, D4, B6 } -/* Encoder pins */ -#define ENCODERS_PAD_A { E6, D2 } -#define ENCODERS_PAD_B { B4, D3 } - #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/murphpad/info.json b/keyboards/mechwild/murphpad/info.json index 57a3c8fa8d3b..92af56f0ddbe 100644 --- a/keyboards/mechwild/murphpad/info.json +++ b/keyboards/mechwild/murphpad/info.json @@ -8,6 +8,12 @@ "pid": "0x1705", "device_version": "3.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E6", "pin_b": "B4"}, + {"pin_a": "D2", "pin_b": "D3"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/mechwild/obe/config.h b/keyboards/mechwild/obe/config.h index e58967c64dea..72efdae1e2b1 100644 --- a/keyboards/mechwild/obe/config.h +++ b/keyboards/mechwild/obe/config.h @@ -31,10 +31,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { A8, B15, B14, B13, B12, A15, B3 } #define MATRIX_COL_PINS { B10, B1, B0, A7, A6, A5, A4, A3, A2, A1 } -/* encoder pins */ -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { B4 } - #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/obe/info.json b/keyboards/mechwild/obe/info.json index 806333a0fa12..cbe9f7cfa806 100644 --- a/keyboards/mechwild/obe/info.json +++ b/keyboards/mechwild/obe/info.json @@ -8,6 +8,11 @@ "pid": "0x1707", "device_version": "2.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B4"} + ] + }, "indicators": { "caps_lock": "B9", "num_lock": "B8" diff --git a/keyboards/mechwild/puckbuddy/config.h b/keyboards/mechwild/puckbuddy/config.h index b21e2c8a964f..bf2e1a0b58db 100644 --- a/keyboards/mechwild/puckbuddy/config.h +++ b/keyboards/mechwild/puckbuddy/config.h @@ -42,10 +42,6 @@ #define CIRQUE_PINNACLE_SPI_DIVISOR 8 #define CIRQUE_PINNACLE_SPI_CS_PIN A4 -/* encoder pins */ -#define ENCODERS_PAD_A { B1, B3 } -#define ENCODERS_PAD_B { B0, A15 } - #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/puckbuddy/info.json b/keyboards/mechwild/puckbuddy/info.json index d0af030ff346..825def96a22d 100644 --- a/keyboards/mechwild/puckbuddy/info.json +++ b/keyboards/mechwild/puckbuddy/info.json @@ -8,6 +8,12 @@ "pid": "0x170F", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B0"}, + {"pin_a": "B3", "pin_b": "A15"} + ] + }, "indicators": { "caps_lock": "C13", "on_state": 0 diff --git a/keyboards/mechwild/waka60/config.h b/keyboards/mechwild/waka60/config.h index 06283c030438..88b160a98068 100644 --- a/keyboards/mechwild/waka60/config.h +++ b/keyboards/mechwild/waka60/config.h @@ -31,10 +31,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B8, B4, B3, B9, A15, B12, B13, B14, B15, A8 } #define MATRIX_COL_PINS { B10, B1, B0, A7, A6, A5, A4 } -/* encoder pins */ -#define ENCODERS_PAD_A { A3 } -#define ENCODERS_PAD_B { A2 } - #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/waka60/info.json b/keyboards/mechwild/waka60/info.json index 8e9a2c11f12f..eb7d2d9f5453 100644 --- a/keyboards/mechwild/waka60/info.json +++ b/keyboards/mechwild/waka60/info.json @@ -8,6 +8,11 @@ "pid": "0x1709", "device_version": "1.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A3", "pin_b": "A2"} + ] + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/meletrix/zoom65/config.h b/keyboards/meletrix/zoom65/config.h index 0bf850043caf..45afb19c997f 100644 --- a/keyboards/meletrix/zoom65/config.h +++ b/keyboards/meletrix/zoom65/config.h @@ -22,14 +22,8 @@ #define DIODE_DIRECTION COL2ROW -/* Enable encoder */ -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B0 } - #define ENCODERS 1 -#define ENCODER_RESOLUTION 2 - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 5, 4 } } #define ENCODERS_CCW_KEY { { 3, 4 } } diff --git a/keyboards/meletrix/zoom65/info.json b/keyboards/meletrix/zoom65/info.json index 18be91ee2633..0968df479464 100644 --- a/keyboards/meletrix/zoom65/info.json +++ b/keyboards/meletrix/zoom65/info.json @@ -8,6 +8,11 @@ "pid": "0x0004", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B0", "resolution": 2} + ] + }, "indicators": { "caps_lock": "F7", "on_state": 0 diff --git a/keyboards/meletrix/zoom65_lite/config.h b/keyboards/meletrix/zoom65_lite/config.h index 0bf850043caf..45afb19c997f 100644 --- a/keyboards/meletrix/zoom65_lite/config.h +++ b/keyboards/meletrix/zoom65_lite/config.h @@ -22,14 +22,8 @@ #define DIODE_DIRECTION COL2ROW -/* Enable encoder */ -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B0 } - #define ENCODERS 1 -#define ENCODER_RESOLUTION 2 - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 5, 4 } } #define ENCODERS_CCW_KEY { { 3, 4 } } diff --git a/keyboards/meletrix/zoom65_lite/info.json b/keyboards/meletrix/zoom65_lite/info.json index f3839d2e883b..d5dcd621ef46 100644 --- a/keyboards/meletrix/zoom65_lite/info.json +++ b/keyboards/meletrix/zoom65_lite/info.json @@ -8,6 +8,11 @@ "pid": "0x0005", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B0", "resolution": 2} + ] + }, "indicators": { "caps_lock": "F7", "on_state": 0 diff --git a/keyboards/merge/iso_macro/config.h b/keyboards/merge/iso_macro/config.h index c038b62073a6..92c3ac43dd0f 100644 --- a/keyboards/merge/iso_macro/config.h +++ b/keyboards/merge/iso_macro/config.h @@ -23,7 +23,3 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - - -#define ENCODERS_PAD_A { F0, D0 } -#define ENCODERS_PAD_B { F1, D1 } diff --git a/keyboards/merge/iso_macro/info.json b/keyboards/merge/iso_macro/info.json index 3c5f6d6784ab..8147d0bf72e5 100644 --- a/keyboards/merge/iso_macro/info.json +++ b/keyboards/merge/iso_macro/info.json @@ -8,6 +8,12 @@ "pid": "0x1200", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F0", "pin_b": "F1"}, + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/merge/uc1/config.h b/keyboards/merge/uc1/config.h index cc72c0910a0f..9dcfb6e07445 100644 --- a/keyboards/merge/uc1/config.h +++ b/keyboards/merge/uc1/config.h @@ -39,6 +39,3 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F6 } diff --git a/keyboards/merge/uc1/info.json b/keyboards/merge/uc1/info.json index d42f88c7948b..55b68a4510c0 100644 --- a/keyboards/merge/uc1/info.json +++ b/keyboards/merge/uc1/info.json @@ -8,6 +8,11 @@ "pid": "0x5543", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/merge/um70/config.h b/keyboards/merge/um70/config.h index 69500ee60375..c249a1816a66 100644 --- a/keyboards/merge/um70/config.h +++ b/keyboards/merge/um70/config.h @@ -42,6 +42,3 @@ #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(STARTUP_SOUND) #endif - -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } diff --git a/keyboards/merge/um70/info.json b/keyboards/merge/um70/info.json index 3c57c7749271..e548d63151e2 100644 --- a/keyboards/merge/um70/info.json +++ b/keyboards/merge/um70/info.json @@ -8,6 +8,11 @@ "pid": "0x3222", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/merge/um80/config.h b/keyboards/merge/um80/config.h index bba359e02f17..238e5f6d4369 100644 --- a/keyboards/merge/um80/config.h +++ b/keyboards/merge/um80/config.h @@ -42,6 +42,3 @@ #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(STARTUP_SOUND) #endif - -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } diff --git a/keyboards/merge/um80/info.json b/keyboards/merge/um80/info.json index a467a97c77c3..e3e1359c9276 100644 --- a/keyboards/merge/um80/info.json +++ b/keyboards/merge/um80/info.json @@ -8,6 +8,11 @@ "pid": "0x3241", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/merge/uma/config.h b/keyboards/merge/uma/config.h index 8744fc0fd512..e4eb35fdaaa3 100644 --- a/keyboards/merge/uma/config.h +++ b/keyboards/merge/uma/config.h @@ -26,6 +26,3 @@ #define SPLIT_USB_DETECT #define SPLIT_MODS_ENABLE - -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } diff --git a/keyboards/merge/uma/info.json b/keyboards/merge/uma/info.json index 0031f4ae8e03..21e7a9546b43 100644 --- a/keyboards/merge/uma/info.json +++ b/keyboards/merge/uma/info.json @@ -8,6 +8,11 @@ "pid": "0x3232", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/metamechs/timberwolf/config.h b/keyboards/metamechs/timberwolf/config.h index 7e259d081710..e9a7da79d640 100644 --- a/keyboards/metamechs/timberwolf/config.h +++ b/keyboards/metamechs/timberwolf/config.h @@ -34,16 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* Wncoswe pins */ -#define ENCODERS_PAD_A { B7 } -#define ENCODERS_PAD_B { B3 } - -/* Encoder resolution, lower number = more sensitive */ -#define ENCODER_RESOLUTION 2 - -/* Reverse encoder direction */ -// #define ENCODER_DIRECTION_FLIP - /* Backlighting code used for caps lock indicator */ #define BACKLIGHT_PIN C6 #define BACKLIGHT_LEVELS 16 diff --git a/keyboards/metamechs/timberwolf/info.json b/keyboards/metamechs/timberwolf/info.json index 87ee8d48a8fd..fdb1195903e2 100644 --- a/keyboards/metamechs/timberwolf/info.json +++ b/keyboards/metamechs/timberwolf/info.json @@ -8,6 +8,11 @@ "pid": "0x5754", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B7", "pin_b": "B3", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/mexsistor/ludmila/config.h b/keyboards/mexsistor/ludmila/config.h index 56d73345af2f..208e11fc1cb1 100644 --- a/keyboards/mexsistor/ludmila/config.h +++ b/keyboards/mexsistor/ludmila/config.h @@ -51,8 +51,3 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE - - -// Encoder -#define ENCODERS_PAD_A { F6 } -#define ENCODERS_PAD_B { F5 } diff --git a/keyboards/mexsistor/ludmila/info.json b/keyboards/mexsistor/ludmila/info.json index a5709d78284b..ea42f18d3097 100644 --- a/keyboards/mexsistor/ludmila/info.json +++ b/keyboards/mexsistor/ludmila/info.json @@ -8,6 +8,11 @@ "pid": "0x6BF6", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F5"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/millipad/config.h b/keyboards/millipad/config.h index 7b14a34e92d2..ab1d6e7c516e 100644 --- a/keyboards/millipad/config.h +++ b/keyboards/millipad/config.h @@ -37,8 +37,3 @@ along with this program. If not, see . #define LOCKING_RESYNC_ENABLE #define FORCE_NKRO - -/* Encoder Definitions */ - -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } diff --git a/keyboards/millipad/info.json b/keyboards/millipad/info.json index f0a0f2da180a..9469f2babaf1 100644 --- a/keyboards/millipad/info.json +++ b/keyboards/millipad/info.json @@ -8,6 +8,11 @@ "pid": "0x1A1B", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/mincedshon/ecila/config.h b/keyboards/mincedshon/ecila/config.h index 915b3fccb488..9c7e498de3d0 100644 --- a/keyboards/mincedshon/ecila/config.h +++ b/keyboards/mincedshon/ecila/config.h @@ -3,12 +3,6 @@ #pragma once -/* encoder */ -/* #define NUMBER_OF_ENCODERS 1 */ -//#define ENCODERS_PAD_A { D3 } -//#define ENCODERS_PAD_B { D2 } -//#define ENCODER_RESOLUTION 1 - #define RGB_DI_PIN B0 #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/mini_elixivy/config.h b/keyboards/mini_elixivy/config.h index 140214d7268a..fafc79557489 100644 --- a/keyboards/mini_elixivy/config.h +++ b/keyboards/mini_elixivy/config.h @@ -30,8 +30,6 @@ along with this program. If not, see . */ #define MATRIX_ROW_PINS { B5, B6, E6, F6, C7 } #define MATRIX_COL_PINS { F7, F5, F4, F1, F0, B7, D0, D1, D2, D3, D4, D6, D7, B4, C6 } -#define ENCODERS_PAD_A { B0 } -#define ENCODERS_PAD_B { D5 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mini_elixivy/info.json b/keyboards/mini_elixivy/info.json index 84ee3ee6f6a6..3567b555ac0c 100644 --- a/keyboards/mini_elixivy/info.json +++ b/keyboards/mini_elixivy/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "D5"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["65_ansi", "65_iso"], diff --git a/keyboards/mini_ten_key_plus/config.h b/keyboards/mini_ten_key_plus/config.h index cfe0bc16b2e5..1773beff05be 100644 --- a/keyboards/mini_ten_key_plus/config.h +++ b/keyboards/mini_ten_key_plus/config.h @@ -30,8 +30,6 @@ along with this program. If not, see . */ #define MATRIX_ROW_PINS { D4, B1, B5, B4, E6 } #define MATRIX_COL_PINS { F5, F4, B6, D7, C6 } -#define ENCODERS_PAD_A { F7 } -#define ENCODERS_PAD_B { F6 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -56,5 +54,3 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -#define ENCODER_RESOLUTION 2 diff --git a/keyboards/mini_ten_key_plus/info.json b/keyboards/mini_ten_key_plus/info.json index 70c1d76832d2..e69e49b06b54 100644 --- a/keyboards/mini_ten_key_plus/info.json +++ b/keyboards/mini_ten_key_plus/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F7", "pin_b": "F6", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/minimacro5/config.h b/keyboards/minimacro5/config.h index 351fb8a5a5e5..272c37ff5060 100644 --- a/keyboards/minimacro5/config.h +++ b/keyboards/minimacro5/config.h @@ -20,12 +20,6 @@ along with this program. If not, see . //speed for double tap #define TAPPING_TERM 200 - -/* rotary encoder 1,2,3 closest to usb port is 0*/ -#define ENCODERS_PAD_B { D3, F6, F7, D4, C6} -#define ENCODERS_PAD_A { F5, D2, D1, D0, E6} -#define ENCODER_RESOLUTION 2 //default/suggested - /* ws2812 RGB LED */ #define RGB_DI_PIN B5 #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/minimacro5/info.json b/keyboards/minimacro5/info.json index a4969498ed0c..7c6748c574c3 100644 --- a/keyboards/minimacro5/info.json +++ b/keyboards/minimacro5/info.json @@ -8,6 +8,15 @@ "pid": "0x0007", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "F5", "resolution": 2}, + {"pin_a": "F6", "pin_b": "D2", "resolution": 2}, + {"pin_a": "F7", "pin_b": "D1", "resolution": 2}, + {"pin_a": "D4", "pin_b": "D0", "resolution": 2}, + {"pin_a": "C6", "pin_b": "E6", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/misonoworks/karina/config.h b/keyboards/misonoworks/karina/config.h index 95748659e48e..2c71926b81e8 100644 --- a/keyboards/misonoworks/karina/config.h +++ b/keyboards/misonoworks/karina/config.h @@ -29,11 +29,6 @@ along with this program. If not, see . #define MK_3_SPEED #define TERMINAL_HELP -// encoders -#define ENCODERS_PAD_A { B2, F4 } -#define ENCODERS_PAD_B { B1, F5 } -#define ENCODER_RESOLUTION 3 - /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE diff --git a/keyboards/misonoworks/karina/info.json b/keyboards/misonoworks/karina/info.json index a9d1ecbd31c3..922e4117e68c 100644 --- a/keyboards/misonoworks/karina/info.json +++ b/keyboards/misonoworks/karina/info.json @@ -8,6 +8,12 @@ "pid": "0xC456", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B1", "resolution": 3}, + {"pin_a": "F4", "pin_b": "F5", "resolution": 3} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/mixi/config.h b/keyboards/mixi/config.h index e6b2ef096113..ed827231084c 100644 --- a/keyboards/mixi/config.h +++ b/keyboards/mixi/config.h @@ -1,8 +1,5 @@ #pragma once -#define ENCODERS_PAD_A { D7, B1 } -#define ENCODERS_PAD_B { E6, B3 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/mixi/info.json b/keyboards/mixi/info.json index 584a8f85b78b..3af1d02f47cf 100644 --- a/keyboards/mixi/info.json +++ b/keyboards/mixi/info.json @@ -8,6 +8,12 @@ "pid": "0x4D49", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D7", "pin_b": "E6"}, + {"pin_a": "B1", "pin_b": "B3"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/mk65/config.h b/keyboards/mk65/config.h index 400e3fa10e2b..7fa60c79f830 100644 --- a/keyboards/mk65/config.h +++ b/keyboards/mk65/config.h @@ -16,9 +16,4 @@ #pragma once - -/* Encoders */ - -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B2 } #define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/mk65/info.json b/keyboards/mk65/info.json index 01d226ce4c73..84cd0fbca184 100644 --- a/keyboards/mk65/info.json +++ b/keyboards/mk65/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B2"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "matrix_pins": { diff --git a/keyboards/ml/gas75/config.h b/keyboards/ml/gas75/config.h index 0005f030e46f..bd9c4b6e4e75 100644 --- a/keyboards/ml/gas75/config.h +++ b/keyboards/ml/gas75/config.h @@ -27,10 +27,6 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* Encoder pins */ -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F1 } - #ifdef RGB_MATRIX_ENABLE #define RGB_MATRIX_LED_COUNT 3 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 diff --git a/keyboards/ml/gas75/info.json b/keyboards/ml/gas75/info.json index 8ee1c8f94d1a..2687ada0d933 100644 --- a/keyboards/ml/gas75/info.json +++ b/keyboards/ml/gas75/info.json @@ -8,6 +8,11 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F0", "pin_b": "F1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/mlego/m48/rev1/config.h b/keyboards/mlego/m48/rev1/config.h index 53fbffa87865..04c1bb450927 100644 --- a/keyboards/mlego/m48/rev1/config.h +++ b/keyboards/mlego/m48/rev1/config.h @@ -21,13 +21,6 @@ #define MATRIX_COL_PINS \ { A10, A15, B3, B4, B5, B7, B6, A1, A2, A3, A4, A5 } -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A \ - { A0 } -#define ENCODERS_PAD_B \ - { B8 } -#endif - #ifdef RGBLIGHT_ENABLE #define RGBLIGHT_LAYERS #define RGB_DI_PIN B15 diff --git a/keyboards/mlego/m48/rev1/info.json b/keyboards/mlego/m48/rev1/info.json index 83eda36107d5..ecfa4dc940a6 100644 --- a/keyboards/mlego/m48/rev1/info.json +++ b/keyboards/mlego/m48/rev1/info.json @@ -3,6 +3,11 @@ "pid": "0x6261", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A0", "pin_b": "B8"} + ] + }, "indicators": { "caps_lock": "C13", "num_lock": "B12", diff --git a/keyboards/mlego/m60/rev1/config.h b/keyboards/mlego/m60/rev1/config.h index 593117144010..7805e6e82b14 100644 --- a/keyboards/mlego/m60/rev1/config.h +++ b/keyboards/mlego/m60/rev1/config.h @@ -15,19 +15,11 @@ */ #pragma once -#ifdef ENCODER_ENABLE #define MATRIX_ROW_PINS \ { A6, A7, B0, B1, B10 } #define MATRIX_COL_PINS \ { A10, A15, B3, B4, B5, B7, B6, A1, A2, A3, A4, A5 } -#define ENCODERS_PAD_A \ - { A0 } -#define ENCODERS_PAD_B \ - { B8 } - -#endif - #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN B15 diff --git a/keyboards/mlego/m60/rev1/info.json b/keyboards/mlego/m60/rev1/info.json index 9363527fe91e..e9e03cb18982 100644 --- a/keyboards/mlego/m60/rev1/info.json +++ b/keyboards/mlego/m60/rev1/info.json @@ -3,6 +3,11 @@ "pid": "0x6161", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A0", "pin_b": "B8"} + ] + }, "indicators": { "caps_lock": "C13", "num_lock": "B12", diff --git a/keyboards/mlego/m60_split/rev1/config.h b/keyboards/mlego/m60_split/rev1/config.h index 248097b2f494..a835d8c4f315 100644 --- a/keyboards/mlego/m60_split/rev1/config.h +++ b/keyboards/mlego/m60_split/rev1/config.h @@ -27,13 +27,6 @@ #define MATRIX_COL_PINS_RIGHT \ { B0, A3, A2, A1, B7, B5 } // cols are from right to left to match the layout -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A \ - { A0 } -#define ENCODERS_PAD_B \ - { B8 } -#endif - #define SPLIT_LAYER_STATE_ENABLE #define SPLIT_LED_STATE_ENABLE diff --git a/keyboards/mlego/m60_split/rev1/info.json b/keyboards/mlego/m60_split/rev1/info.json index fc9a608c9e3a..237b933eb03d 100644 --- a/keyboards/mlego/m60_split/rev1/info.json +++ b/keyboards/mlego/m60_split/rev1/info.json @@ -3,6 +3,11 @@ "pid": "0x6361", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A0", "pin_b": "B8"} + ] + }, "indicators": { "caps_lock": "C13", "num_lock": "B12", diff --git a/keyboards/mlego/m60_split/rev2/config.h b/keyboards/mlego/m60_split/rev2/config.h index 0fca6fcd0a95..2bb9334497d8 100644 --- a/keyboards/mlego/m60_split/rev2/config.h +++ b/keyboards/mlego/m60_split/rev2/config.h @@ -27,14 +27,6 @@ #define MATRIX_COL_PINS_RIGHT \ { B0, A3, A2, A1, B7, B5 } // cols are from right to left to match the layout - -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A \ - { A0 } -#define ENCODERS_PAD_B \ - { B8 } -#endif - #define SPLIT_LAYER_STATE_ENABLE #define SPLIT_LED_STATE_ENABLE diff --git a/keyboards/mlego/m60_split/rev2/info.json b/keyboards/mlego/m60_split/rev2/info.json index b2b49279c1f6..4e281733e1c3 100644 --- a/keyboards/mlego/m60_split/rev2/info.json +++ b/keyboards/mlego/m60_split/rev2/info.json @@ -3,6 +3,11 @@ "pid": "0x6362", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A0", "pin_b": "B8"} + ] + }, "indicators": { "caps_lock": "C13", "num_lock": "B12", diff --git a/keyboards/mlego/m65/rev1/config.h b/keyboards/mlego/m65/rev1/config.h index 4362e46c7e80..d58ee7627ff1 100644 --- a/keyboards/mlego/m65/rev1/config.h +++ b/keyboards/mlego/m65/rev1/config.h @@ -24,11 +24,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS \ { A10, A15, B3, B4, B5, B9, B8, B7, B6, C15, A0, A7, B10 } -#define ENCODERS_PAD_A \ - { A8 } -#define ENCODERS_PAD_B \ - { A9 } - #define RGB_DI_PIN B15 #define RGBLIGHT_LAYERS diff --git a/keyboards/mlego/m65/rev1/info.json b/keyboards/mlego/m65/rev1/info.json index 9635b31e59fe..f4d8ba75786b 100644 --- a/keyboards/mlego/m65/rev1/info.json +++ b/keyboards/mlego/m65/rev1/info.json @@ -3,6 +3,11 @@ "pid": "0x6061", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A8", "pin_b": "A9"} + ] + }, "indicators": { "caps_lock": "C13", "num_lock": "B12", diff --git a/keyboards/mlego/m65/rev2/config.h b/keyboards/mlego/m65/rev2/config.h index d72c039e3e55..8094879b1c56 100644 --- a/keyboards/mlego/m65/rev2/config.h +++ b/keyboards/mlego/m65/rev2/config.h @@ -24,11 +24,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS \ { A10, A15, B3, B4, B5, B9, B8, B7, B6, C15, A0, A7, B10 } -#define ENCODERS_PAD_A \ - { A8 } -#define ENCODERS_PAD_B \ - { A9 } - #define RGB_DI_PIN B15 #define RGBLIGHT_LAYERS diff --git a/keyboards/mlego/m65/rev2/info.json b/keyboards/mlego/m65/rev2/info.json index 2bde6bdef196..7d265197caee 100644 --- a/keyboards/mlego/m65/rev2/info.json +++ b/keyboards/mlego/m65/rev2/info.json @@ -3,6 +3,11 @@ "pid": "0x6061", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "A8", "pin_b": "A9"} + ] + }, "indicators": { "caps_lock": "B2", "num_lock": "B12", diff --git a/keyboards/mlego/m65/rev3/config.h b/keyboards/mlego/m65/rev3/config.h index 84b8fe7d46cd..4a71449cb01e 100644 --- a/keyboards/mlego/m65/rev3/config.h +++ b/keyboards/mlego/m65/rev3/config.h @@ -24,13 +24,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS \ { A10, A15, B3, B4, B5, B9, B8, B7, A1, A2, A3, A4, B1 } -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A \ - { A0 } -#define ENCODERS_PAD_B \ - { B6 } -#endif - #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN B15 diff --git a/keyboards/mlego/m65/rev3/info.json b/keyboards/mlego/m65/rev3/info.json index 8240ae7acebf..39c26191c667 100644 --- a/keyboards/mlego/m65/rev3/info.json +++ b/keyboards/mlego/m65/rev3/info.json @@ -3,6 +3,11 @@ "pid": "0x6062", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A0", "pin_b": "B6"} + ] + }, "indicators": { "caps_lock": "C13", "num_lock": "B12", diff --git a/keyboards/mlego/m65/rev4/config.h b/keyboards/mlego/m65/rev4/config.h index 0943216c6778..a8b9b596d50e 100644 --- a/keyboards/mlego/m65/rev4/config.h +++ b/keyboards/mlego/m65/rev4/config.h @@ -24,13 +24,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS \ { B14, A8, A10, A15, B3, B4, B5, B7, A1, A2, A3, A4, B1 } -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A \ - { A0 } -#define ENCODERS_PAD_B \ - { B6 } -#endif - #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN B15 diff --git a/keyboards/mlego/m65/rev4/info.json b/keyboards/mlego/m65/rev4/info.json index 465b61f2aa49..91af43a6a1ff 100644 --- a/keyboards/mlego/m65/rev4/info.json +++ b/keyboards/mlego/m65/rev4/info.json @@ -3,6 +3,11 @@ "pid": "0x6062", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "A0", "pin_b": "B6"} + ] + }, "indicators": { "caps_lock": "C13", "num_lock": "B12", diff --git a/keyboards/monarch/config.h b/keyboards/monarch/config.h index 7708f0fc168c..dd7132922887 100644 --- a/keyboards/monarch/config.h +++ b/keyboards/monarch/config.h @@ -21,11 +21,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { A15, B3, B11, A2, A1, B9 } #define DIODE_DIRECTION COL2ROW -/* Rotary encoder pins */ -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } -#define ENCODER_RESOLUTION 1 - //LEDS A6 #define BACKLIGHT_PIN A6 #define BACKLIGHT_PWM_DRIVER PWMD3 diff --git a/keyboards/monarch/info.json b/keyboards/monarch/info.json index cb5239e91594..1bd23e580ae1 100644 --- a/keyboards/monarch/info.json +++ b/keyboards/monarch/info.json @@ -8,6 +8,11 @@ "pid": "0x43C1", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5", "resolution": 1} + ] + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/montsinger/rebound/rev2/config.h b/keyboards/montsinger/rebound/rev2/config.h index a2c486969056..cbf4c9b8df70 100644 --- a/keyboards/montsinger/rebound/rev2/config.h +++ b/keyboards/montsinger/rebound/rev2/config.h @@ -30,9 +30,6 @@ diode) #define MATRIX_ROW_PINS { D1, B5, B2, B6, B0 } #define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4, B3, B1, F7, F6, F5, F4 } -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D3 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/montsinger/rebound/rev2/info.json b/keyboards/montsinger/rebound/rev2/info.json index cac145319ca3..8c2aec4e4d04 100644 --- a/keyboards/montsinger/rebound/rev2/info.json +++ b/keyboards/montsinger/rebound/rev2/info.json @@ -8,6 +8,11 @@ "pid": "0x552F", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D3"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["ortho_4x12"], diff --git a/keyboards/montsinger/rebound/rev3/config.h b/keyboards/montsinger/rebound/rev3/config.h index fff82c341d33..00506c85bc80 100644 --- a/keyboards/montsinger/rebound/rev3/config.h +++ b/keyboards/montsinger/rebound/rev3/config.h @@ -30,9 +30,6 @@ diode) #define MATRIX_ROW_PINS { F4, F5, D1, D0, B0 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6 } -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/montsinger/rebound/rev3/info.json b/keyboards/montsinger/rebound/rev3/info.json index 3d0df4117767..2f9338afc341 100644 --- a/keyboards/montsinger/rebound/rev3/info.json +++ b/keyboards/montsinger/rebound/rev3/info.json @@ -8,6 +8,11 @@ "pid": "0x552F", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["ortho_4x12"], diff --git a/keyboards/montsinger/rebound/rev4/config.h b/keyboards/montsinger/rebound/rev4/config.h index 3c89fff25ce9..58cf478e13a0 100644 --- a/keyboards/montsinger/rebound/rev4/config.h +++ b/keyboards/montsinger/rebound/rev4/config.h @@ -30,9 +30,6 @@ diode) #define MATRIX_ROW_PINS { D1, D0, D4, C6, F7, F6, F5, F4 } #define MATRIX_COL_PINS { D7, E6, B4, B5, B2, B3, B1 } -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D3 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/montsinger/rebound/rev4/info.json b/keyboards/montsinger/rebound/rev4/info.json index cde8ba679d09..dd76ea25e9f3 100644 --- a/keyboards/montsinger/rebound/rev4/info.json +++ b/keyboards/montsinger/rebound/rev4/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D3"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["ortho_4x12"], diff --git a/keyboards/murcielago/info.json b/keyboards/murcielago/info.json index 14f87681bf24..b54258280b7b 100644 --- a/keyboards/murcielago/info.json +++ b/keyboards/murcielago/info.json @@ -8,8 +8,20 @@ "pid": "0x0001", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "F0", "pin_b": "F1"} + ] + }, "split": { - "soft_serial_pin": "E6" + "soft_serial_pin": "E6", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F7"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/murcielago/rev1/config.h b/keyboards/murcielago/rev1/config.h index 223129a9e32d..f334ebc63f40 100644 --- a/keyboards/murcielago/rev1/config.h +++ b/keyboards/murcielago/rev1/config.h @@ -36,12 +36,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS_RIGHT { B3, B7, D4, B6, C6, C7 } #define MATRIX_COL_PINS_RIGHT { D6, D7, D3, B2, B1, B0 } -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F1 } -#define ENCODERS_PAD_A_RIGHT { F6 } -#define ENCODERS_PAD_B_RIGHT { F7 } - - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mwstudio/alicekk/config.h b/keyboards/mwstudio/alicekk/config.h index dc85bb4fc7d9..290871bde5d9 100644 --- a/keyboards/mwstudio/alicekk/config.h +++ b/keyboards/mwstudio/alicekk/config.h @@ -48,6 +48,3 @@ #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#define ENCODERS_PAD_A { B11 } -#define ENCODERS_PAD_B { B10 } diff --git a/keyboards/mwstudio/alicekk/info.json b/keyboards/mwstudio/alicekk/info.json index 19a735ebc508..ec0d58b07ec7 100644 --- a/keyboards/mwstudio/alicekk/info.json +++ b/keyboards/mwstudio/alicekk/info.json @@ -6,6 +6,11 @@ "pid": "0x3201", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B11", "pin_b": "B10"} + ] + }, "processor": "STM32F103", "bootloader": "stm32duino", "layouts": { diff --git a/keyboards/mwstudio/mw65_black/config.h b/keyboards/mwstudio/mw65_black/config.h index 3f5d53797de9..79d1d5e1b245 100644 --- a/keyboards/mwstudio/mw65_black/config.h +++ b/keyboards/mwstudio/mw65_black/config.h @@ -31,6 +31,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#define ENCODERS_PAD_A { E6 } -#define ENCODERS_PAD_B { D6 } diff --git a/keyboards/mwstudio/mw65_black/info.json b/keyboards/mwstudio/mw65_black/info.json index 030936eaef62..23151df68689 100644 --- a/keyboards/mwstudio/mw65_black/info.json +++ b/keyboards/mwstudio/mw65_black/info.json @@ -8,6 +8,11 @@ "pid": "0x6500", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E6", "pin_b": "D6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layout_aliases": { diff --git a/keyboards/mwstudio/mw65_rgb/config.h b/keyboards/mwstudio/mw65_rgb/config.h index 62cfab574b13..2a90d77ee98b 100644 --- a/keyboards/mwstudio/mw65_rgb/config.h +++ b/keyboards/mwstudio/mw65_rgb/config.h @@ -24,10 +24,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Encoder pins */ -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B2 } - /* RGB Matrix config */ #define RGB_DI_PIN B3 diff --git a/keyboards/mwstudio/mw65_rgb/info.json b/keyboards/mwstudio/mw65_rgb/info.json index d09a0d7b3a7a..ee00dd70c13b 100644 --- a/keyboards/mwstudio/mw65_rgb/info.json +++ b/keyboards/mwstudio/mw65_rgb/info.json @@ -8,6 +8,11 @@ "pid": "0x6502", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B2"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/mwstudio/mw75/config.h b/keyboards/mwstudio/mw75/config.h index 7c8ab74588da..4cb7a8a22cdb 100644 --- a/keyboards/mwstudio/mw75/config.h +++ b/keyboards/mwstudio/mw75/config.h @@ -81,6 +81,3 @@ #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B2 } diff --git a/keyboards/mwstudio/mw75/info.json b/keyboards/mwstudio/mw75/info.json index bc4404203fc7..866f488a6ee3 100644 --- a/keyboards/mwstudio/mw75/info.json +++ b/keyboards/mwstudio/mw75/info.json @@ -8,6 +8,11 @@ "pid": "0x7501", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B2"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/mwstudio/mw75r2/config.h b/keyboards/mwstudio/mw75r2/config.h index bd39ed9b2804..b5f4500d58ff 100644 --- a/keyboards/mwstudio/mw75r2/config.h +++ b/keyboards/mwstudio/mw75r2/config.h @@ -56,6 +56,3 @@ #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B2 } diff --git a/keyboards/mwstudio/mw75r2/info.json b/keyboards/mwstudio/mw75r2/info.json index 621d9beafae3..4d794246eb2d 100644 --- a/keyboards/mwstudio/mw75r2/info.json +++ b/keyboards/mwstudio/mw75r2/info.json @@ -8,6 +8,11 @@ "pid": "0x7502", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B2"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { From c639b226206affa7e383c5483ecf93102f3f0ecb Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:35:13 +1100 Subject: [PATCH 17/31] Move encoder config to info.json, N --- keyboards/ncc1701kb/config.h | 5 ----- keyboards/ncc1701kb/info.json | 5 +++++ keyboards/neito/config.h | 2 -- keyboards/neito/info.json | 5 +++++ keyboards/neopad/rev1/config.h | 4 ---- keyboards/neopad/rev1/info.json | 6 ++++++ keyboards/nightingale_studios/hailey/config.h | 3 --- keyboards/nightingale_studios/hailey/info.json | 5 +++++ keyboards/nightly_boards/adellein/config.h | 4 ---- keyboards/nightly_boards/adellein/info.json | 5 +++++ keyboards/nightly_boards/n40_o/config.h | 4 ---- keyboards/nightly_boards/n40_o/info.json | 7 +++++++ keyboards/nightly_boards/n60_s/config.h | 4 ---- keyboards/nightly_boards/n60_s/info.json | 5 +++++ keyboards/nightly_boards/octopad/config.h | 4 ---- keyboards/nightly_boards/octopad/info.json | 6 ++++++ keyboards/nightly_boards/octopadplus/config.h | 4 +--- keyboards/nightly_boards/octopadplus/info.json | 6 ++++++ keyboards/nixkeyboards/day_off/config.h | 6 ------ keyboards/nixkeyboards/day_off/info.json | 5 +++++ keyboards/nopunin10did/kastenwagen1840/config.h | 5 ----- keyboards/nopunin10did/kastenwagen1840/info.json | 6 ++++++ keyboards/nopunin10did/kastenwagen48/config.h | 5 ----- keyboards/nopunin10did/kastenwagen48/info.json | 6 ++++++ keyboards/np12/config.h | 5 ----- keyboards/np12/info.json | 5 +++++ keyboards/nullbitsco/nibble/config.h | 4 ---- keyboards/nullbitsco/nibble/info.json | 5 +++++ keyboards/nullbitsco/scramble/v1/config.h | 3 --- keyboards/nullbitsco/scramble/v1/info.json | 5 +++++ keyboards/nullbitsco/scramble/v2/config.h | 3 --- keyboards/nullbitsco/scramble/v2/info.json | 5 +++++ keyboards/nullbitsco/tidbit/config.h | 5 ----- keyboards/nullbitsco/tidbit/info.json | 8 ++++++++ 34 files changed, 96 insertions(+), 69 deletions(-) diff --git a/keyboards/ncc1701kb/config.h b/keyboards/ncc1701kb/config.h index 09207fb27afc..c8e20d14d4b7 100644 --- a/keyboards/ncc1701kb/config.h +++ b/keyboards/ncc1701kb/config.h @@ -26,11 +26,6 @@ along with this program. If not, see . #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING -/*Encoders */ -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D1 } - - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ncc1701kb/info.json b/keyboards/ncc1701kb/info.json index 41c76f52f584..c92a22f4f407 100644 --- a/keyboards/ncc1701kb/info.json +++ b/keyboards/ncc1701kb/info.json @@ -8,6 +8,11 @@ "pid": "0x1701", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/neito/config.h b/keyboards/neito/config.h index 1e3440026bcf..d287a605e890 100644 --- a/keyboards/neito/config.h +++ b/keyboards/neito/config.h @@ -19,8 +19,6 @@ #define MATRIX_COL_PINS { F4, F1, F7, B2, D1, D2, B3, B1 } #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B7 } -#define ENCODERS_PAD_B { B0 } #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/neito/info.json b/keyboards/neito/info.json index 36b8e0ba229f..6ee67116812e 100644 --- a/keyboards/neito/info.json +++ b/keyboards/neito/info.json @@ -8,6 +8,11 @@ "pid": "0xB44C", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B7", "pin_b": "B0"} + ] + }, "backlight": { "on_state": 0 }, diff --git a/keyboards/neopad/rev1/config.h b/keyboards/neopad/rev1/config.h index 74f394e8c7f8..dce1020b444c 100755 --- a/keyboards/neopad/rev1/config.h +++ b/keyboards/neopad/rev1/config.h @@ -21,10 +21,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5 } #define MATRIX_COL_PINS { B3, B2, B6 } -/* Dual rotary encoders */ -#define ENCODERS_PAD_A { D1, D4 } -#define ENCODERS_PAD_B { D0, C6 } - /* Onboard LEDs */ #define LED_00 F6 #define LED_01 F7 diff --git a/keyboards/neopad/rev1/info.json b/keyboards/neopad/rev1/info.json index f0ced98faae9..48654b694119 100755 --- a/keyboards/neopad/rev1/info.json +++ b/keyboards/neopad/rev1/info.json @@ -8,6 +8,12 @@ "pid": "0x0913", "device_version": "0.1.0" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"}, + {"pin_a": "D4", "pin_b": "C6"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/nightingale_studios/hailey/config.h b/keyboards/nightingale_studios/hailey/config.h index a0873dfce1a3..dece45d140d5 100644 --- a/keyboards/nightingale_studios/hailey/config.h +++ b/keyboards/nightingale_studios/hailey/config.h @@ -34,9 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B4 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/nightingale_studios/hailey/info.json b/keyboards/nightingale_studios/hailey/info.json index 52f364ef0ac4..7316afacb92b 100644 --- a/keyboards/nightingale_studios/hailey/info.json +++ b/keyboards/nightingale_studios/hailey/info.json @@ -7,6 +7,11 @@ "pid": "0x4879", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B4"} + ] + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/nightly_boards/adellein/config.h b/keyboards/nightly_boards/adellein/config.h index 070224510ca9..639d7ed31451 100644 --- a/keyboards/nightly_boards/adellein/config.h +++ b/keyboards/nightly_boards/adellein/config.h @@ -53,10 +53,6 @@ along with this program. If not, see . /* Encoders */ #define ENCODERS 1 - -#define ENCODERS_PAD_A { C7 } -#define ENCODERS_PAD_B { C6 } - #define ENCODERS_CW_KEY { { 3, 3 } } #define ENCODERS_CCW_KEY { { 1, 3 } } diff --git a/keyboards/nightly_boards/adellein/info.json b/keyboards/nightly_boards/adellein/info.json index 58b49b329043..7967cfc99b43 100644 --- a/keyboards/nightly_boards/adellein/info.json +++ b/keyboards/nightly_boards/adellein/info.json @@ -8,6 +8,11 @@ "pid": "0x0010", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C7", "pin_b": "C6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/nightly_boards/n40_o/config.h b/keyboards/nightly_boards/n40_o/config.h index 3bd829623a70..3c976819e002 100644 --- a/keyboards/nightly_boards/n40_o/config.h +++ b/keyboards/nightly_boards/n40_o/config.h @@ -53,10 +53,6 @@ along with this program. If not, see . /* Encoders */ #define ENCODERS 3 - -#define ENCODERS_PAD_A { F6, F4 , B6 } -#define ENCODERS_PAD_B { F7, F5 , C6 } - #define ENCODERS_CW_KEY { { 2, 4 },{ 4, 4 },{ 6, 4 } } #define ENCODERS_CCW_KEY { { 1, 4 },{ 3, 4 },{ 5, 4 } } diff --git a/keyboards/nightly_boards/n40_o/info.json b/keyboards/nightly_boards/n40_o/info.json index e2ccad4db315..f68bc89be366 100644 --- a/keyboards/nightly_boards/n40_o/info.json +++ b/keyboards/nightly_boards/n40_o/info.json @@ -8,6 +8,13 @@ "pid": "0x0009", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F7"}, + {"pin_a": "F4", "pin_b": "F5"}, + {"pin_a": "B6", "pin_b": "C6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/nightly_boards/n60_s/config.h b/keyboards/nightly_boards/n60_s/config.h index c892acd41aa0..e1feda71e467 100644 --- a/keyboards/nightly_boards/n60_s/config.h +++ b/keyboards/nightly_boards/n60_s/config.h @@ -37,10 +37,6 @@ along with this program. If not, see . /* Encoders */ #define ENCODERS 1 - -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D5 } - #define ENCODERS_CW_KEY { { 1, 5 } } #define ENCODERS_CCW_KEY { { 0, 5 } } diff --git a/keyboards/nightly_boards/n60_s/info.json b/keyboards/nightly_boards/n60_s/info.json index 37a0d3895c5e..519f31cf2865 100644 --- a/keyboards/nightly_boards/n60_s/info.json +++ b/keyboards/nightly_boards/n60_s/info.json @@ -8,6 +8,11 @@ "pid": "0x0007", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D5"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/nightly_boards/octopad/config.h b/keyboards/nightly_boards/octopad/config.h index e5e87f04dcd6..47ea794c045c 100644 --- a/keyboards/nightly_boards/octopad/config.h +++ b/keyboards/nightly_boards/octopad/config.h @@ -53,10 +53,6 @@ along with this program. If not, see . /* Encoders */ #define ENCODERS 2 - -#define ENCODERS_PAD_A { C7, F4 } -#define ENCODERS_PAD_B { C6, F5 } - #define ENCODERS_CW_KEY { { 3, 2 },{ 1, 2 } } #define ENCODERS_CCW_KEY { { 2, 2 },{ 0, 2 } } diff --git a/keyboards/nightly_boards/octopad/info.json b/keyboards/nightly_boards/octopad/info.json index ce794f28a814..d6dfc74805f0 100644 --- a/keyboards/nightly_boards/octopad/info.json +++ b/keyboards/nightly_boards/octopad/info.json @@ -8,6 +8,12 @@ "pid": "0x0004", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C7", "pin_b": "C6"}, + {"pin_a": "F4", "pin_b": "F5"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/nightly_boards/octopadplus/config.h b/keyboards/nightly_boards/octopadplus/config.h index dc61f0a039f1..324e6e4a70e7 100644 --- a/keyboards/nightly_boards/octopadplus/config.h +++ b/keyboards/nightly_boards/octopadplus/config.h @@ -38,10 +38,8 @@ along with this program. If not, see . /* Encoders */ #define ENCODERS 2 -#define ENCODERS_PAD_A { F0, D1 } -#define ENCODERS_PAD_B { F1, D0 } + #define TAP_CODE_DELAY 10 -#define ENCODER_RESOLUTION 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/nightly_boards/octopadplus/info.json b/keyboards/nightly_boards/octopadplus/info.json index 8f0d6766e0c3..0dbd1dee7088 100644 --- a/keyboards/nightly_boards/octopadplus/info.json +++ b/keyboards/nightly_boards/octopadplus/info.json @@ -8,6 +8,12 @@ "pid": "0x0014", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F0", "pin_b": "F1", "resolution": 5}, + {"pin_a": "D1", "pin_b": "D0", "resolution": 5} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "rgblight": { diff --git a/keyboards/nixkeyboards/day_off/config.h b/keyboards/nixkeyboards/day_off/config.h index 92b9c01ec898..a280d81458de 100644 --- a/keyboards/nixkeyboards/day_off/config.h +++ b/keyboards/nixkeyboards/day_off/config.h @@ -22,9 +22,3 @@ #define MATRIX_COL_PINS \ { F0, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } #define DIODE_DIRECTION COL2ROW - -/* encoder */ -#define ENCODERS_PAD_A \ - { B0 } -#define ENCODERS_PAD_B \ - { B1 } diff --git a/keyboards/nixkeyboards/day_off/info.json b/keyboards/nixkeyboards/day_off/info.json index 145da5d2f4a0..4a9d7bbff6e7 100644 --- a/keyboards/nixkeyboards/day_off/info.json +++ b/keyboards/nixkeyboards/day_off/info.json @@ -8,6 +8,11 @@ "pid": "0x444F", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1"} + ] + }, "bootmagic": { "matrix": [0, 1] }, diff --git a/keyboards/nopunin10did/kastenwagen1840/config.h b/keyboards/nopunin10did/kastenwagen1840/config.h index 4f154d3c693c..80a7793edb79 100644 --- a/keyboards/nopunin10did/kastenwagen1840/config.h +++ b/keyboards/nopunin10did/kastenwagen1840/config.h @@ -26,10 +26,5 @@ #define LED_INDICATOR_MID D4 #define LED_INDICATOR_BOT C6 -/* Rotary encoder rotation pins */ -#define ENCODERS_PAD_A { D0, D3 } -#define ENCODERS_PAD_B { D1, D2 } - - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nopunin10did/kastenwagen1840/info.json b/keyboards/nopunin10did/kastenwagen1840/info.json index 07a1ce0a1025..bf6b9234b068 100644 --- a/keyboards/nopunin10did/kastenwagen1840/info.json +++ b/keyboards/nopunin10did/kastenwagen1840/info.json @@ -8,6 +8,12 @@ "pid": "0x4B57", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"}, + {"pin_a": "D3", "pin_b": "D2"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/nopunin10did/kastenwagen48/config.h b/keyboards/nopunin10did/kastenwagen48/config.h index 92a82ab267a9..555a0c488f56 100644 --- a/keyboards/nopunin10did/kastenwagen48/config.h +++ b/keyboards/nopunin10did/kastenwagen48/config.h @@ -26,10 +26,5 @@ #define LED_INDICATOR_MID D4 #define LED_INDICATOR_BOT C6 -/* Rotary encoder rotation pins */ -#define ENCODERS_PAD_A { D0, D3 } -#define ENCODERS_PAD_B { D1, D2 } - - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nopunin10did/kastenwagen48/info.json b/keyboards/nopunin10did/kastenwagen48/info.json index a1333c1c5e27..00fe51e38139 100644 --- a/keyboards/nopunin10did/kastenwagen48/info.json +++ b/keyboards/nopunin10did/kastenwagen48/info.json @@ -8,6 +8,12 @@ "pid": "0x4B30", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"}, + {"pin_a": "D3", "pin_b": "D2"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/np12/config.h b/keyboards/np12/config.h index cd4d98e943c1..3a09f4060d03 100644 --- a/keyboards/np12/config.h +++ b/keyboards/np12/config.h @@ -22,8 +22,3 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - -#define ENCODERS_PAD_A { F4 } -#define ENCODERS_PAD_B { F5 } - - diff --git a/keyboards/np12/info.json b/keyboards/np12/info.json index a5612a8c1498..7ae6325768fa 100644 --- a/keyboards/np12/info.json +++ b/keyboards/np12/info.json @@ -8,6 +8,11 @@ "pid": "0x4401", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/nullbitsco/nibble/config.h b/keyboards/nullbitsco/nibble/config.h index 2d203594bf75..af85027e6486 100644 --- a/keyboards/nullbitsco/nibble/config.h +++ b/keyboards/nullbitsco/nibble/config.h @@ -52,7 +52,3 @@ #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE #define RGBLIGHT_SLEEP - -/* Optional encoder pins */ -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { B4 } diff --git a/keyboards/nullbitsco/nibble/info.json b/keyboards/nullbitsco/nibble/info.json index b59fee241153..5c69cb0e7ecf 100644 --- a/keyboards/nullbitsco/nibble/info.json +++ b/keyboards/nullbitsco/nibble/info.json @@ -7,6 +7,11 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B4"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 10, diff --git a/keyboards/nullbitsco/scramble/v1/config.h b/keyboards/nullbitsco/scramble/v1/config.h index 6a7742ce8785..bb0ee7d7854b 100644 --- a/keyboards/nullbitsco/scramble/v1/config.h +++ b/keyboards/nullbitsco/scramble/v1/config.h @@ -19,7 +19,4 @@ along with this program. If not, see . #pragma once -/* Optional encoder pins */ -#define ENCODERS_PAD_A { D6 } -#define ENCODERS_PAD_B { D7 } #define TAP_CODE_DELAY 10 diff --git a/keyboards/nullbitsco/scramble/v1/info.json b/keyboards/nullbitsco/scramble/v1/info.json index 0acb6993735a..77a00d91f4bf 100644 --- a/keyboards/nullbitsco/scramble/v1/info.json +++ b/keyboards/nullbitsco/scramble/v1/info.json @@ -1,4 +1,9 @@ { + "encoder": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D7"} + ] + }, "processor": "atmega328p", "bootloader": "usbasploader", "matrix_pins": { diff --git a/keyboards/nullbitsco/scramble/v2/config.h b/keyboards/nullbitsco/scramble/v2/config.h index dd2ae6274967..d3b3c44222cf 100644 --- a/keyboards/nullbitsco/scramble/v2/config.h +++ b/keyboards/nullbitsco/scramble/v2/config.h @@ -19,9 +19,6 @@ along with this program. If not, see . #pragma once -/* Optional encoder pins */ -#define ENCODERS_PAD_A { GP24 } -#define ENCODERS_PAD_B { GP25 } #define TAP_CODE_DELAY 10 /* RP2040-specific defines*/ diff --git a/keyboards/nullbitsco/scramble/v2/info.json b/keyboards/nullbitsco/scramble/v2/info.json index ba27823b3605..5255c32205e7 100644 --- a/keyboards/nullbitsco/scramble/v2/info.json +++ b/keyboards/nullbitsco/scramble/v2/info.json @@ -1,4 +1,9 @@ { + "encoder": { + "rotary": [ + {"pin_a": "GP24", "pin_b": "GP25"} + ] + }, "processor": "RP2040", "bootloader": "rp2040", "matrix_pins": { diff --git a/keyboards/nullbitsco/tidbit/config.h b/keyboards/nullbitsco/tidbit/config.h index 37f05b06e205..23b2f5f1a4cf 100644 --- a/keyboards/nullbitsco/tidbit/config.h +++ b/keyboards/nullbitsco/tidbit/config.h @@ -42,8 +42,3 @@ #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE - -/* Optional encoder pins */ -// Encoders are defined in order. 1: B2 & B3, 2: B4 & B5, 3: D0 & D1, 4: D2 & D3 -#define ENCODERS_PAD_A { B2, B4, D0, D3 } -#define ENCODERS_PAD_B { B3, B5, D1, D2 } diff --git a/keyboards/nullbitsco/tidbit/info.json b/keyboards/nullbitsco/tidbit/info.json index ec014a66809c..cce2a2902cca 100644 --- a/keyboards/nullbitsco/tidbit/info.json +++ b/keyboards/nullbitsco/tidbit/info.json @@ -7,6 +7,14 @@ "pid": "0x6064", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3"}, + {"pin_a": "B4", "pin_b": "B5"}, + {"pin_a": "D0", "pin_b": "D1"}, + {"pin_a": "D3", "pin_b": "D2"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { From 8b549109d080b61c4b58ee8ba2379e735c89fe40 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:35:21 +1100 Subject: [PATCH 18/31] Move encoder config to info.json, O --- keyboards/om60/config.h | 3 --- keyboards/om60/info.json | 5 +++++ keyboards/onekeyco/dango40/config.h | 3 --- keyboards/onekeyco/dango40/info.json | 5 +++++ keyboards/orthocode/config.h | 3 --- keyboards/orthocode/info.json | 5 +++++ keyboards/owlab/voice65/hotswap/config.h | 4 ---- keyboards/owlab/voice65/hotswap/info.json | 5 +++++ keyboards/owlab/voice65/soldered/config.h | 4 ---- keyboards/owlab/voice65/soldered/info.json | 5 +++++ 10 files changed, 25 insertions(+), 17 deletions(-) diff --git a/keyboards/om60/config.h b/keyboards/om60/config.h index 6a647475a28a..9af406eec559 100644 --- a/keyboards/om60/config.h +++ b/keyboards/om60/config.h @@ -95,6 +95,3 @@ along with this program. If not, see . #endif #define TAP_CODE_DELAY 10 - -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } diff --git a/keyboards/om60/info.json b/keyboards/om60/info.json index 4da5396c58b2..c33231efe8c6 100644 --- a/keyboards/om60/info.json +++ b/keyboards/om60/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/onekeyco/dango40/config.h b/keyboards/onekeyco/dango40/config.h index 6d1cd822c9e0..70eb0ad47f1d 100644 --- a/keyboards/onekeyco/dango40/config.h +++ b/keyboards/onekeyco/dango40/config.h @@ -23,9 +23,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F1, F0, C6 } #define MATRIX_COL_PINS { F7, F6, F5, D3, D5, D4, D6, D7, B4, B5, B6, C7, B0 } -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D1 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/onekeyco/dango40/info.json b/keyboards/onekeyco/dango40/info.json index d964098f3d5c..208365163451 100644 --- a/keyboards/onekeyco/dango40/info.json +++ b/keyboards/onekeyco/dango40/info.json @@ -8,6 +8,11 @@ "pid": "0xE9B9", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/orthocode/config.h b/keyboards/orthocode/config.h index adacefb87c97..b6a1f1d52cc4 100644 --- a/keyboards/orthocode/config.h +++ b/keyboards/orthocode/config.h @@ -36,9 +36,6 @@ along with this program. If not, see . #define USB_MAX_POWER_CONSUMPTION 100 -#define ENCODERS_PAD_A { D1 } -#define ENCODERS_PAD_B { D0 } -#define ENCODER_RESOLUTION 1 #define TAP_CODE_DELAY 10 #define RGB_DI_PIN D5 diff --git a/keyboards/orthocode/info.json b/keyboards/orthocode/info.json index f918fbe2586f..578cb2b907be 100644 --- a/keyboards/orthocode/info.json +++ b/keyboards/orthocode/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0", "resolution": 1} + ] + }, "processor": "atmega32a", "bootloader": "usbasploader", "debounce": 0, diff --git a/keyboards/owlab/voice65/hotswap/config.h b/keyboards/owlab/voice65/hotswap/config.h index 45d139d27701..9a1aacc4fa07 100644 --- a/keyboards/owlab/voice65/hotswap/config.h +++ b/keyboards/owlab/voice65/hotswap/config.h @@ -111,8 +111,4 @@ along with this program. If not, see . # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif -/* Encoder */ -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } - #define TAP_CODE_DELAY 10 diff --git a/keyboards/owlab/voice65/hotswap/info.json b/keyboards/owlab/voice65/hotswap/info.json index b17375dd5cfd..7a5215bf86a8 100644 --- a/keyboards/owlab/voice65/hotswap/info.json +++ b/keyboards/owlab/voice65/hotswap/info.json @@ -8,6 +8,11 @@ "pid": "0x564F", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "layout_aliases": { diff --git a/keyboards/owlab/voice65/soldered/config.h b/keyboards/owlab/voice65/soldered/config.h index 454e7bb36487..fc5aafd1cef1 100644 --- a/keyboards/owlab/voice65/soldered/config.h +++ b/keyboards/owlab/voice65/soldered/config.h @@ -112,8 +112,4 @@ along with this program. If not, see . # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif -/* Encoder */ -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } - #define TAP_CODE_DELAY 10 diff --git a/keyboards/owlab/voice65/soldered/info.json b/keyboards/owlab/voice65/soldered/info.json index 8135dcf29d92..4a3c8a693663 100644 --- a/keyboards/owlab/voice65/soldered/info.json +++ b/keyboards/owlab/voice65/soldered/info.json @@ -8,6 +8,11 @@ "pid": "0x5657", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "community_layouts": ["65_ansi_blocker", "65_ansi_blocker_split_bs", "65_ansi_blocker_tsangan", "65_iso_blocker", "65_iso_blocker_split_bs"], From 00f9012a74022df135c175eebf361bbee7799c47 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:35:30 +1100 Subject: [PATCH 19/31] Move encoder config to info.json, P --- keyboards/p3d/glitch/config.h | 4 ---- keyboards/p3d/glitch/info.json | 5 +++++ keyboards/pabile/p18/config.h | 4 ---- keyboards/pabile/p18/info.json | 6 ++++++ keyboards/pabile/p20/ver1/config.h | 3 --- keyboards/pabile/p20/ver1/info.json | 6 ++++++ keyboards/palette1202/config.h | 7 ------- keyboards/palette1202/info.json | 6 ++++++ keyboards/pearlboards/atlas/config.h | 6 ------ keyboards/pearlboards/atlas/info.json | 5 +++++ keyboards/pearlboards/pandora/config.h | 5 ----- keyboards/pearlboards/pandora/info.json | 5 +++++ keyboards/pearlboards/zeus/config.h | 6 ------ keyboards/pearlboards/zeus/info.json | 5 +++++ keyboards/pearlboards/zeuspad/config.h | 6 ------ keyboards/pearlboards/zeuspad/info.json | 5 +++++ keyboards/pegasus/config.h | 5 ----- keyboards/pegasus/info.json | 6 ++++++ keyboards/peranekofactory/tone/rev1/config.h | 3 --- keyboards/peranekofactory/tone/rev1/info.json | 5 +++++ keyboards/peranekofactory/tone/rev2/config.h | 3 --- keyboards/peranekofactory/tone/rev2/info.json | 5 +++++ keyboards/percent/canoe_gen2/config.h | 3 --- keyboards/planck/ez/config.h | 3 --- keyboards/planck/ez/info.json | 5 +++++ keyboards/planck/rev6/config.h | 4 ---- keyboards/planck/rev6/info.json | 5 +++++ keyboards/planck/rev6_drop/config.h | 6 ------ keyboards/planck/rev6_drop/info.json | 5 +++++ keyboards/planck/thk/config.h | 3 --- keyboards/planck/thk/info.json | 6 ++++++ keyboards/pluckey/config.h | 8 -------- keyboards/pluckey/info.json | 14 +++++++++++++- keyboards/pohjolaworks/louhi/config.h | 4 ---- keyboards/pohjolaworks/louhi/info.json | 5 +++++ keyboards/preonic/rev3/config.h | 3 --- keyboards/preonic/rev3/info.json | 5 +++++ keyboards/preonic/rev3_drop/config.h | 3 --- keyboards/preonic/rev3_drop/info.json | 5 +++++ keyboards/program_yoink/config.h | 4 ---- keyboards/program_yoink/ortho/info.json | 5 +++++ keyboards/program_yoink/staggered/info.json | 5 +++++ keyboards/projectcain/relic/config.h | 3 --- keyboards/projectcain/relic/info.json | 5 +++++ keyboards/projectcain/vault35/config.h | 4 ---- keyboards/projectcain/vault35/info.json | 5 +++++ keyboards/projectcain/vault45/config.h | 4 ---- keyboards/projectcain/vault45/info.json | 6 ++++++ keyboards/protozoa/p01/config.h | 2 -- keyboards/protozoa/p01/info.json | 5 +++++ keyboards/psuieee/pluto12/config.h | 4 ---- keyboards/psuieee/pluto12/info.json | 5 +++++ keyboards/pteron36/config.h | 8 -------- keyboards/pteron36/info.json | 14 +++++++++++++- keyboards/punk75/config.h | 4 ---- keyboards/punk75/info.json | 6 ++++++ 56 files changed, 163 insertions(+), 124 deletions(-) diff --git a/keyboards/p3d/glitch/config.h b/keyboards/p3d/glitch/config.h index c53685cf2ea9..961897c4d657 100644 --- a/keyboards/p3d/glitch/config.h +++ b/keyboards/p3d/glitch/config.h @@ -46,10 +46,6 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define ENCODERS_PAD_A { F6 } -#define ENCODERS_PAD_B { F7 } -#define ENCODER_RESOLUTION 2 - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/p3d/glitch/info.json b/keyboards/p3d/glitch/info.json index 9de0250289f7..9aee029a07a1 100644 --- a/keyboards/p3d/glitch/info.json +++ b/keyboards/p3d/glitch/info.json @@ -8,6 +8,11 @@ "pid": "0x3568", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F7", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/pabile/p18/config.h b/keyboards/pabile/p18/config.h index 391e429afed7..2b450e8fff3c 100644 --- a/keyboards/pabile/p18/config.h +++ b/keyboards/pabile/p18/config.h @@ -22,10 +22,6 @@ along with this program. If not, see . /* pin-out for PROMICRO */ #define MATRIX_ROW_PINS { D1, D0, D4, C6 } #define MATRIX_COL_PINS { D2, D7, E6, B4, B5 } - -/* Encoder position for PROMICRO */ -#define ENCODERS_PAD_A { B6, F6 } -#define ENCODERS_PAD_B { F4, F5 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p18/info.json b/keyboards/pabile/p18/info.json index ce40842afee8..3859d7852f75 100644 --- a/keyboards/pabile/p18/info.json +++ b/keyboards/pabile/p18/info.json @@ -8,6 +8,12 @@ "pid": "0x6668", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "F4"}, + {"pin_a": "F6", "pin_b": "F5"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/pabile/p20/ver1/config.h b/keyboards/pabile/p20/ver1/config.h index a8e50b43c4c9..4505e2718e7a 100644 --- a/keyboards/pabile/p20/ver1/config.h +++ b/keyboards/pabile/p20/ver1/config.h @@ -21,9 +21,6 @@ along with this program. If not, see . /* pin-out */ #define MATRIX_ROW_PINS { B3, B4, B5, D7, E6 } #define MATRIX_COL_PINS { D0, B2, D4, B6 } - -#define ENCODERS_PAD_A { F5, F7 } -#define ENCODERS_PAD_B { F6, B1 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW \ No newline at end of file diff --git a/keyboards/pabile/p20/ver1/info.json b/keyboards/pabile/p20/ver1/info.json index cea8ee87a0b2..1c5781995f62 100644 --- a/keyboards/pabile/p20/ver1/info.json +++ b/keyboards/pabile/p20/ver1/info.json @@ -3,6 +3,12 @@ "usb": { "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"}, + {"pin_a": "F7", "pin_b": "B1"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina" } diff --git a/keyboards/palette1202/config.h b/keyboards/palette1202/config.h index 34898d5ee9a2..d3c5f5edc07c 100644 --- a/keyboards/palette1202/config.h +++ b/keyboards/palette1202/config.h @@ -24,13 +24,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* Encoders */ -#define ENCODERS_PAD_A { F4, F6 } -#define ENCODERS_PAD_B { F5, F7 } -#define ENCODER_RESOLUTION 2 -// if you want to reverse encoder direction -// #define ENCODER_DIRECTION_FLIP - /* Register custom font file */ #ifdef OLED_ENABLE #define OLED_FONT_H "lib/glcdfont.c" diff --git a/keyboards/palette1202/info.json b/keyboards/palette1202/info.json index 0b33a8572276..6698af203be3 100644 --- a/keyboards/palette1202/info.json +++ b/keyboards/palette1202/info.json @@ -8,6 +8,12 @@ "pid": "0x1202", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5", "resolution": 2}, + {"pin_a": "F6", "pin_b": "F7", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/pearlboards/atlas/config.h b/keyboards/pearlboards/atlas/config.h index ee2c5f149077..92cef2fde0dc 100644 --- a/keyboards/pearlboards/atlas/config.h +++ b/keyboards/pearlboards/atlas/config.h @@ -34,12 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* Encoder Function */ -#define ENCODERS_PAD_A { E0 } -#define ENCODERS_PAD_B { D7 } -//#define ENCODER_DIRECTION_FLIP -#define ENCODER_RESOLUTION 1 - /* Audio Function */ #define AUDIO_CLICKY #define AUDIO_PIN C6 diff --git a/keyboards/pearlboards/atlas/info.json b/keyboards/pearlboards/atlas/info.json index 31cf97aa4edb..77c129e79fe9 100644 --- a/keyboards/pearlboards/atlas/info.json +++ b/keyboards/pearlboards/atlas/info.json @@ -8,6 +8,11 @@ "pid": "0x6964", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E0", "pin_b": "D7", "resolution": 1} + ] + }, "indicators": { "caps_lock": "F4", "num_lock": "F5", diff --git a/keyboards/pearlboards/pandora/config.h b/keyboards/pearlboards/pandora/config.h index bd198d9758ac..c039db9a159c 100644 --- a/keyboards/pearlboards/pandora/config.h +++ b/keyboards/pearlboards/pandora/config.h @@ -34,11 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* Encoder Function */ -#define ENCODERS_PAD_A { F6 } -#define ENCODERS_PAD_B { F5 } -//#define ENCODER_DIRECTION_FLIP -#define ENCODER_RESOLUTION 1 #define DIP_SWITCH_PINS { B2, B5 } /*== all animations enabled ==*/ diff --git a/keyboards/pearlboards/pandora/info.json b/keyboards/pearlboards/pandora/info.json index 592fecff65df..0114fb8e78bf 100644 --- a/keyboards/pearlboards/pandora/info.json +++ b/keyboards/pearlboards/pandora/info.json @@ -8,6 +8,11 @@ "pid": "0x6963", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F5", "resolution": 1} + ] + }, "indicators": { "caps_lock": "E6", "on_state": 0 diff --git a/keyboards/pearlboards/zeus/config.h b/keyboards/pearlboards/zeus/config.h index 99473d96e0bd..deb979dd061d 100644 --- a/keyboards/pearlboards/zeus/config.h +++ b/keyboards/pearlboards/zeus/config.h @@ -34,12 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* Encoder Function */ -#define ENCODERS_PAD_A { E7 } -#define ENCODERS_PAD_B { E6 } -//#define ENCODER_DIRECTION_FLIP -#define ENCODER_RESOLUTION 1 - /* Audio Function */ #define AUDIO_CLICKY #define AUDIO_PIN C6 diff --git a/keyboards/pearlboards/zeus/info.json b/keyboards/pearlboards/zeus/info.json index c5b1fb640c39..3d2f44a892c9 100644 --- a/keyboards/pearlboards/zeus/info.json +++ b/keyboards/pearlboards/zeus/info.json @@ -8,6 +8,11 @@ "pid": "0x6966", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E7", "pin_b": "E6", "resolution": 1} + ] + }, "indicators": { "caps_lock": "C5", "num_lock": "C4", diff --git a/keyboards/pearlboards/zeuspad/config.h b/keyboards/pearlboards/zeuspad/config.h index 84c4f2d784f9..f61e11fca904 100644 --- a/keyboards/pearlboards/zeuspad/config.h +++ b/keyboards/pearlboards/zeuspad/config.h @@ -41,12 +41,6 @@ along with this program. If not, see . #define AUDIO_CLICKY #define AUDIO_PIN C6 -/* Encoder Function */ -#define ENCODERS_PAD_A { D6 } -#define ENCODERS_PAD_B { D4 } -//#define ENCODER_DIRECTION_FLIP -#define ENCODER_RESOLUTION 1 - /*== all animations enabled ==*/ /* If RGBLIGHT_SLEEP defined, the RGB lighting will be switched off when the host goes to sleep */ #define RGB_DI_PIN B7 diff --git a/keyboards/pearlboards/zeuspad/info.json b/keyboards/pearlboards/zeuspad/info.json index 0558b83aad12..3258e758a87c 100644 --- a/keyboards/pearlboards/zeuspad/info.json +++ b/keyboards/pearlboards/zeuspad/info.json @@ -8,6 +8,11 @@ "pid": "0x6967", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D4", "resolution": 1} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 0, diff --git a/keyboards/pegasus/config.h b/keyboards/pegasus/config.h index d25cf13f5a79..78ade39d7721 100644 --- a/keyboards/pegasus/config.h +++ b/keyboards/pegasus/config.h @@ -40,11 +40,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* Rotary Encoder Definitions */ -#define ENCODERS_PAD_A { D0, D5 } -#define ENCODERS_PAD_B { D1, D3 } - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/pegasus/info.json b/keyboards/pegasus/info.json index 597c7b98e540..d6663796f870 100644 --- a/keyboards/pegasus/info.json +++ b/keyboards/pegasus/info.json @@ -8,6 +8,12 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"}, + {"pin_a": "D5", "pin_b": "D3"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/peranekofactory/tone/rev1/config.h b/keyboards/peranekofactory/tone/rev1/config.h index 9429a2261fc4..c97fab915a3b 100644 --- a/keyboards/peranekofactory/tone/rev1/config.h +++ b/keyboards/peranekofactory/tone/rev1/config.h @@ -17,9 +17,6 @@ along with this program. If not, see . #pragma once -/* Rotary encoder define*/ -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { B4 } #define TAP_CODE_DELAY 100 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/peranekofactory/tone/rev1/info.json b/keyboards/peranekofactory/tone/rev1/info.json index 00afdbbdc7aa..24e57770459e 100644 --- a/keyboards/peranekofactory/tone/rev1/info.json +++ b/keyboards/peranekofactory/tone/rev1/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B4"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/peranekofactory/tone/rev2/config.h b/keyboards/peranekofactory/tone/rev2/config.h index 9429a2261fc4..c97fab915a3b 100644 --- a/keyboards/peranekofactory/tone/rev2/config.h +++ b/keyboards/peranekofactory/tone/rev2/config.h @@ -17,9 +17,6 @@ along with this program. If not, see . #pragma once -/* Rotary encoder define*/ -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { B4 } #define TAP_CODE_DELAY 100 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/peranekofactory/tone/rev2/info.json b/keyboards/peranekofactory/tone/rev2/info.json index 00afdbbdc7aa..24e57770459e 100644 --- a/keyboards/peranekofactory/tone/rev2/info.json +++ b/keyboards/peranekofactory/tone/rev2/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B4"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/percent/canoe_gen2/config.h b/keyboards/percent/canoe_gen2/config.h index 15b2ad262fc8..7138fe393917 100644 --- a/keyboards/percent/canoe_gen2/config.h +++ b/keyboards/percent/canoe_gen2/config.h @@ -23,9 +23,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS {B1,B3,B2,F5,F4} #define MATRIX_COL_PINS {B0,D0,C6,B6,B5,B4,D7,D6,D4,D5,D3,D2,D1,F6,F7} -/* Uncomment if your encoder doesn't react to every turn or skips */ -//#define ENCODER_RESOLUTION 2 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h index a569b3d59083..04bfc314ce6d 100644 --- a/keyboards/planck/ez/config.h +++ b/keyboards/planck/ez/config.h @@ -35,9 +35,6 @@ #define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2 } #define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 } -#define ENCODERS_PAD_A { B12 } -#define ENCODERS_PAD_B { B13 } - #define MUSIC_MAP #undef AUDIO_VOICES #undef AUDIO_PIN diff --git a/keyboards/planck/ez/info.json b/keyboards/planck/ez/info.json index 9e400ee45feb..ae67be691dde 100644 --- a/keyboards/planck/ez/info.json +++ b/keyboards/planck/ez/info.json @@ -6,6 +6,11 @@ "vid": "0x3297", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B12", "pin_b": "B13"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "community_layouts": ["ortho_4x12", "planck_mit"], diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 0852b7baa96b..a60c086b5b65 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -34,10 +34,6 @@ #define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2 } #define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 } - -#define ENCODERS_PAD_A { B12 } -#define ENCODERS_PAD_B { B13 } - #define DIP_SWITCH_PINS { B14, A15, A0, B9 } #define MUSIC_MAP diff --git a/keyboards/planck/rev6/info.json b/keyboards/planck/rev6/info.json index 6e46d01954c7..9cc60ab5f021 100644 --- a/keyboards/planck/rev6/info.json +++ b/keyboards/planck/rev6/info.json @@ -8,6 +8,11 @@ "pid": "0xA4F9", "device_version": "0.0.6" }, + "encoder": { + "rotary": [ + {"pin_a": "B12", "pin_b": "B13"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "board": "QMK_PROTON_C", diff --git a/keyboards/planck/rev6_drop/config.h b/keyboards/planck/rev6_drop/config.h index bd78de6257d8..192d3fc6d8e9 100644 --- a/keyboards/planck/rev6_drop/config.h +++ b/keyboards/planck/rev6_drop/config.h @@ -36,12 +36,6 @@ #define MATRIX_COL_PINS \ { B11, B10, B2, B1, A7, B0 } - -#define ENCODERS_PAD_A \ - { B12 } -#define ENCODERS_PAD_B \ - { B13 } - #define DIP_SWITCH_PINS \ { B14, A15, A0, B9 } diff --git a/keyboards/planck/rev6_drop/info.json b/keyboards/planck/rev6_drop/info.json index f2a3db508269..828f0c20b8ec 100644 --- a/keyboards/planck/rev6_drop/info.json +++ b/keyboards/planck/rev6_drop/info.json @@ -8,6 +8,11 @@ "pid": "0xA4F9", "device_version": "0.0.6" }, + "encoder": { + "rotary": [ + {"pin_a": "B12", "pin_b": "B13"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "community_layouts": ["ortho_4x12", "planck_mit"], diff --git a/keyboards/planck/thk/config.h b/keyboards/planck/thk/config.h index ed6b52d05c4a..bd93164345c5 100644 --- a/keyboards/planck/thk/config.h +++ b/keyboards/planck/thk/config.h @@ -26,9 +26,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { A7, A6, A5, A4 } #define MATRIX_COL_PINS { D7, C2, C3, C4, C5, C6, C7, A3, A2, A1, A0, B0 } -#define ENCODERS_PAD_A { B4, B2 } -#define ENCODERS_PAD_B { B3, B1 } - #define TAPPING_TOGGLE 3 #define DIP_SWITCH_PINS { D0, D1, D4, D6 } diff --git a/keyboards/planck/thk/info.json b/keyboards/planck/thk/info.json index 8824929a3900..50ee36da3bf3 100644 --- a/keyboards/planck/thk/info.json +++ b/keyboards/planck/thk/info.json @@ -8,6 +8,12 @@ "pid": "0x25A7", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B3"}, + {"pin_a": "B2", "pin_b": "B1"} + ] + }, "processor": "atmega32a", "bootloader": "usbasploader", "layout_aliases": { diff --git a/keyboards/pluckey/config.h b/keyboards/pluckey/config.h index 47d5538ca83f..21c01e89ee57 100644 --- a/keyboards/pluckey/config.h +++ b/keyboards/pluckey/config.h @@ -31,14 +31,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, F7 } #define DIODE_DIRECTION COL2ROW -/* encoder support */ -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B2 } -#define ENCODER_RESOLUTION 2 -#define ENCODERS_PAD_A_RIGHT { B2 } -#define ENCODERS_PAD_B_RIGHT { B3 } -#define ENCODER_RESOLUTION_RIGHT 2 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/pluckey/info.json b/keyboards/pluckey/info.json index 019fdd1acde8..faeb0df2f42a 100644 --- a/keyboards/pluckey/info.json +++ b/keyboards/pluckey/info.json @@ -8,8 +8,20 @@ "pid": "0x91CE", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2", "resolution": 2} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3", "resolution": 2} + ] + } + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/pohjolaworks/louhi/config.h b/keyboards/pohjolaworks/louhi/config.h index 11c688359045..12721a16b057 100644 --- a/keyboards/pohjolaworks/louhi/config.h +++ b/keyboards/pohjolaworks/louhi/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Encoder pins */ -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B3 } - #define RGB_DI_PIN B5 #ifdef RGB_DI_PIN # define RGBLED_NUM 14 diff --git a/keyboards/pohjolaworks/louhi/info.json b/keyboards/pohjolaworks/louhi/info.json index a6d3fa1d3571..0185fe83bbda 100644 --- a/keyboards/pohjolaworks/louhi/info.json +++ b/keyboards/pohjolaworks/louhi/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index a777ded38b85..2269aef97fe6 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -22,9 +22,6 @@ #define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2, A3, A6 } #define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 } -#define ENCODERS_PAD_A { B12 } -#define ENCODERS_PAD_B { B13 } - #define DIP_SWITCH_PINS { B14, A15, A0, B9 } #define MUSIC_MAP diff --git a/keyboards/preonic/rev3/info.json b/keyboards/preonic/rev3/info.json index 0f396fc87eff..cc3b94447126 100644 --- a/keyboards/preonic/rev3/info.json +++ b/keyboards/preonic/rev3/info.json @@ -6,6 +6,11 @@ "pid": "0xA649", "device_version": "0.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "B12", "pin_b": "B13"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "board": "QMK_PROTON_C", diff --git a/keyboards/preonic/rev3_drop/config.h b/keyboards/preonic/rev3_drop/config.h index 071b7bc667af..4d1bfe67b9b5 100644 --- a/keyboards/preonic/rev3_drop/config.h +++ b/keyboards/preonic/rev3_drop/config.h @@ -22,9 +22,6 @@ #define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2, A3, A6 } #define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 } -#define ENCODERS_PAD_A { B12 } -#define ENCODERS_PAD_B { B13 } - #define DIP_SWITCH_PINS { B14, A15, A0, B9 } #define MUSIC_MAP diff --git a/keyboards/preonic/rev3_drop/info.json b/keyboards/preonic/rev3_drop/info.json index c8095a62e696..3f32a10b363d 100644 --- a/keyboards/preonic/rev3_drop/info.json +++ b/keyboards/preonic/rev3_drop/info.json @@ -6,6 +6,11 @@ "pid": "0xA649", "device_version": "0.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "B12", "pin_b": "B13"} + ] + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "community_layouts": ["ortho_5x12"], diff --git a/keyboards/program_yoink/config.h b/keyboards/program_yoink/config.h index 417ab0e4730a..261ebaca5bc8 100644 --- a/keyboards/program_yoink/config.h +++ b/keyboards/program_yoink/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/*Encoder Definition*/ -#define ENCODERS_PAD_A { D1 } -#define ENCODERS_PAD_B { D0 } - /*RGB*/ #define RGB_DI_PIN D4 #ifdef RGB_DI_PIN diff --git a/keyboards/program_yoink/ortho/info.json b/keyboards/program_yoink/ortho/info.json index e27a7b661800..eeab79d169c3 100644 --- a/keyboards/program_yoink/ortho/info.json +++ b/keyboards/program_yoink/ortho/info.json @@ -8,6 +8,11 @@ "pid": "0xF10C", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/program_yoink/staggered/info.json b/keyboards/program_yoink/staggered/info.json index 7c98c3ed717d..252a110e8ba0 100644 --- a/keyboards/program_yoink/staggered/info.json +++ b/keyboards/program_yoink/staggered/info.json @@ -8,6 +8,11 @@ "pid": "0xF10B", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/projectcain/relic/config.h b/keyboards/projectcain/relic/config.h index d93c7ee5d2a1..baa5b5263bd4 100644 --- a/keyboards/projectcain/relic/config.h +++ b/keyboards/projectcain/relic/config.h @@ -16,9 +16,6 @@ along with this program. If not, see . */ #pragma once -#define ENCODERS_PAD_A { D4 } -#define ENCODERS_PAD_B { D6 } - /* * Keyboard Matrix Assignments diff --git a/keyboards/projectcain/relic/info.json b/keyboards/projectcain/relic/info.json index 5c07c8e1063c..9d0820b4e626 100644 --- a/keyboards/projectcain/relic/info.json +++ b/keyboards/projectcain/relic/info.json @@ -8,6 +8,11 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "D6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/projectcain/vault35/config.h b/keyboards/projectcain/vault35/config.h index 0d40b434e8ee..457e2f0ab384 100644 --- a/keyboards/projectcain/vault35/config.h +++ b/keyboards/projectcain/vault35/config.h @@ -31,10 +31,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D6 } -#define ENCODERS_PAD_B { D7 } -#define ENCODER_RESOLUTION 2 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/projectcain/vault35/info.json b/keyboards/projectcain/vault35/info.json index 467c8293e808..488d81b6b845 100644 --- a/keyboards/projectcain/vault35/info.json +++ b/keyboards/projectcain/vault35/info.json @@ -8,6 +8,11 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D7", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/projectcain/vault45/config.h b/keyboards/projectcain/vault45/config.h index 1a54f1568768..b70109bfa307 100644 --- a/keyboards/projectcain/vault45/config.h +++ b/keyboards/projectcain/vault45/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B3, D1 } -#define ENCODERS_PAD_B { B2, D2 } -#define ENCODER_RESOLUTION 2 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/projectcain/vault45/info.json b/keyboards/projectcain/vault45/info.json index a8a4dcba8ec9..ecfa953fd41e 100644 --- a/keyboards/projectcain/vault45/info.json +++ b/keyboards/projectcain/vault45/info.json @@ -8,6 +8,12 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2", "resolution": 2}, + {"pin_a": "D1", "pin_b": "D2", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layout_aliases": { diff --git a/keyboards/protozoa/p01/config.h b/keyboards/protozoa/p01/config.h index 4ebfa1b381d4..c2a0d7aae3c3 100644 --- a/keyboards/protozoa/p01/config.h +++ b/keyboards/protozoa/p01/config.h @@ -23,8 +23,6 @@ along with this program. If not, see . /* Encoder */ #define ENCODERS 1 -#define ENCODERS_PAD_A { B15 } -#define ENCODERS_PAD_B { B14 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/protozoa/p01/info.json b/keyboards/protozoa/p01/info.json index d4c6872ef5a2..77e1449458bf 100644 --- a/keyboards/protozoa/p01/info.json +++ b/keyboards/protozoa/p01/info.json @@ -8,6 +8,11 @@ "pid": "0x5031", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B15", "pin_b": "B14"} + ] + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/psuieee/pluto12/config.h b/keyboards/psuieee/pluto12/config.h index 0404bac74215..91922c6d9534 100644 --- a/keyboards/psuieee/pluto12/config.h +++ b/keyboards/psuieee/pluto12/config.h @@ -8,10 +8,6 @@ #define MATRIX_ROW_PINS { D0, D4, C6 } #define MATRIX_COL_PINS { D7, E6, B4, B5 } -/* Encoder Assignments */ -#define ENCODERS_PAD_A { B6 } -#define ENCODERS_PAD_B { B2 } - /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/psuieee/pluto12/info.json b/keyboards/psuieee/pluto12/info.json index 422973a6d1a0..752b2ab97f25 100644 --- a/keyboards/psuieee/pluto12/info.json +++ b/keyboards/psuieee/pluto12/info.json @@ -8,6 +8,11 @@ "pid": "0x7012", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B2"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/pteron36/config.h b/keyboards/pteron36/config.h index a053dc0c1657..be1de23f8388 100644 --- a/keyboards/pteron36/config.h +++ b/keyboards/pteron36/config.h @@ -58,14 +58,6 @@ along with this program. If not, see . // for via #define DYNAMIC_KEYMAP_LAYER_COUNT 7 -//left encoder -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } - -//right encoder -#define ENCODERS_PAD_A_RIGHT { F4 } -#define ENCODERS_PAD_B_RIGHT { F5 } - //RGB Underglow #define RGB_DI_PIN B6 #define RGBLED_NUM 10 diff --git a/keyboards/pteron36/info.json b/keyboards/pteron36/info.json index 6cd22fe6c794..c65b15cfb253 100644 --- a/keyboards/pteron36/info.json +++ b/keyboards/pteron36/info.json @@ -8,8 +8,20 @@ "pid": "0x5054", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + }, "split": { - "soft_serial_pin": "D3" + "soft_serial_pin": "D3", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/punk75/config.h b/keyboards/punk75/config.h index 4e0699c9739b..ba9c6fdc7124 100644 --- a/keyboards/punk75/config.h +++ b/keyboards/punk75/config.h @@ -32,10 +32,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C2, C3, C6, C5, C4, A7, A6, A5, A4, B4, A3, B3, A2, B2, A1 } #define LED A0 -#define ENCODERS_PAD_A { D0, B1} -#define ENCODERS_PAD_B { D1, B0 } - - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/punk75/info.json b/keyboards/punk75/info.json index 77d5495d8679..b232007bb24f 100644 --- a/keyboards/punk75/info.json +++ b/keyboards/punk75/info.json @@ -8,6 +8,12 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"}, + {"pin_a": "B1", "pin_b": "B0"} + ] + }, "processor": "atmega32a", "bootloader": "usbasploader", "community_layouts": ["ortho_5x15"], From 21de04090b6b94ef5dac60d4f073f77a5e1e7ba8 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:35:38 +1100 Subject: [PATCH 20/31] Move encoder config to info.json, Q --- keyboards/qpockets/eggman/config.h | 4 ---- keyboards/qpockets/eggman/info.json | 6 ++++++ keyboards/qpockets/space_space/rev1/config.h | 10 ---------- keyboards/qpockets/space_space/rev1/info.json | 6 ++++++ keyboards/qpockets/space_space/rev2/config.h | 8 -------- keyboards/qpockets/space_space/rev2/info.json | 6 ++++++ keyboards/qpockets/wanten/config.h | 4 ---- keyboards/qpockets/wanten/info.json | 6 ++++++ keyboards/qvex/lynepad/config.h | 4 ---- keyboards/qvex/lynepad/info.json | 6 ++++++ keyboards/qwertlekeys/calice/config.h | 4 ---- keyboards/qwertlekeys/calice/info.json | 5 +++++ 12 files changed, 35 insertions(+), 34 deletions(-) diff --git a/keyboards/qpockets/eggman/config.h b/keyboards/qpockets/eggman/config.h index 1e3d900e32f9..eac213400ab6 100644 --- a/keyboards/qpockets/eggman/config.h +++ b/keyboards/qpockets/eggman/config.h @@ -23,7 +23,3 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - -/* ROTARY ENCODERS */ -#define ENCODERS_PAD_A { C6, D4 } -#define ENCODERS_PAD_B { C7, D5 } diff --git a/keyboards/qpockets/eggman/info.json b/keyboards/qpockets/eggman/info.json index 5d63633cfaec..989402411db8 100644 --- a/keyboards/qpockets/eggman/info.json +++ b/keyboards/qpockets/eggman/info.json @@ -8,6 +8,12 @@ "pid": "0x656D", "device_version": "10.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "C7"}, + {"pin_a": "D4", "pin_b": "D5"} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/qpockets/space_space/rev1/config.h b/keyboards/qpockets/space_space/rev1/config.h index 3970a0719792..22c2bc73dee2 100644 --- a/keyboards/qpockets/space_space/rev1/config.h +++ b/keyboards/qpockets/space_space/rev1/config.h @@ -26,14 +26,4 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* ROTARY ENCODERS */ -#define ENCODERS_PAD_A \ - { B3, D6 } -#define ENCODERS_PAD_B \ - { B2, D7 } - -#define ENCODER_RESOLUTIONS \ - { 3, 4 } -//#define ENCODER_DIRECTION_FLIP - #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/qpockets/space_space/rev1/info.json b/keyboards/qpockets/space_space/rev1/info.json index 394a03b5ee03..cd9dcb56a8a3 100644 --- a/keyboards/qpockets/space_space/rev1/info.json +++ b/keyboards/qpockets/space_space/rev1/info.json @@ -8,6 +8,12 @@ "pid": "0x7373", "device_version": "30.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2", "resolution": 3}, + {"pin_a": "D6", "pin_b": "D7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 7, diff --git a/keyboards/qpockets/space_space/rev2/config.h b/keyboards/qpockets/space_space/rev2/config.h index f3dff6bd3d51..26b85360c43f 100644 --- a/keyboards/qpockets/space_space/rev2/config.h +++ b/keyboards/qpockets/space_space/rev2/config.h @@ -26,14 +26,6 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* ROTARY ENCODERS */ -#define ENCODERS_PAD_A \ - { B4, C7 } -#define ENCODERS_PAD_B \ - { D7, F7 } - -#define ENCODER_RESOLUTION 3 - #define LOCKING_SUPPORT_ENABLE #define RGB_DI_PIN F0 diff --git a/keyboards/qpockets/space_space/rev2/info.json b/keyboards/qpockets/space_space/rev2/info.json index e895a35d4de3..580ab0a4d523 100644 --- a/keyboards/qpockets/space_space/rev2/info.json +++ b/keyboards/qpockets/space_space/rev2/info.json @@ -8,6 +8,12 @@ "pid": "0x7373", "device_version": "30.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "D7", "resolution": 3}, + {"pin_a": "C7", "pin_b": "F7", "resolution": 3} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/qpockets/wanten/config.h b/keyboards/qpockets/wanten/config.h index 0d980a23372f..a811be9a74c0 100644 --- a/keyboards/qpockets/wanten/config.h +++ b/keyboards/qpockets/wanten/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* ROTARY ENCODERS */ -#define ENCODERS_PAD_A { F5, D6 } -#define ENCODERS_PAD_B { F6, D7 } - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/qpockets/wanten/info.json b/keyboards/qpockets/wanten/info.json index 61ff2f78dae7..e35237a358b1 100644 --- a/keyboards/qpockets/wanten/info.json +++ b/keyboards/qpockets/wanten/info.json @@ -8,6 +8,12 @@ "pid": "0x7774", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"}, + {"pin_a": "D6", "pin_b": "D7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 4, diff --git a/keyboards/qvex/lynepad/config.h b/keyboards/qvex/lynepad/config.h index 7c6547aabd40..830b5364a5e9 100644 --- a/keyboards/qvex/lynepad/config.h +++ b/keyboards/qvex/lynepad/config.h @@ -25,10 +25,6 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Encoders */ -#define ENCODERS_PAD_A { D0, B5 } -#define ENCODERS_PAD_B { D1, D6 } - /* LEDs */ #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN diff --git a/keyboards/qvex/lynepad/info.json b/keyboards/qvex/lynepad/info.json index ef0088d47a53..f2930137d26f 100644 --- a/keyboards/qvex/lynepad/info.json +++ b/keyboards/qvex/lynepad/info.json @@ -8,6 +8,12 @@ "pid": "0x4C50", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"}, + {"pin_a": "B5", "pin_b": "D6"}, + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/qwertlekeys/calice/config.h b/keyboards/qwertlekeys/calice/config.h index 9eb4366cb0e9..4de51720eaa0 100644 --- a/keyboards/qwertlekeys/calice/config.h +++ b/keyboards/qwertlekeys/calice/config.h @@ -20,10 +20,6 @@ #define MATRIX_ROW_PINS {F0, F1, F5, F4, C6, C7, B5, B6, D4, D2, D5, D3} #define MATRIX_COL_PINS {D7, B4, F7, F6, D1, B7, B3, B2} -/* Envoder */ -#define ENCODERS_PAD_A {B0} -#define ENCODERS_PAD_B {B1} - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/qwertlekeys/calice/info.json b/keyboards/qwertlekeys/calice/info.json index 1d3f5cb90a51..5a425f97a864 100644 --- a/keyboards/qwertlekeys/calice/info.json +++ b/keyboards/qwertlekeys/calice/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1"} + ] + }, "indicators": { "caps_lock": "D6" }, From 0483c0f129ec2e55588b992a9f281c24a9fd3bf4 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:35:47 +1100 Subject: [PATCH 21/31] Move encoder config to info.json, R --- keyboards/rainkeebs/rainkeeb/config.h | 4 ---- keyboards/rainkeebs/rainkeeb/info.json | 5 +++++ keyboards/rart/rart4x4/config.h | 3 --- keyboards/rart/rart4x4/info.json | 6 ++++++ keyboards/rart/rart75/config.h | 3 --- keyboards/rart/rart75/info.json | 5 +++++ keyboards/rart/rart75hs/config.h | 3 --- keyboards/rart/rart75hs/info.json | 5 +++++ keyboards/rart/rart75m/config.h | 4 ---- keyboards/rart/rart75m/info.json | 5 +++++ keyboards/rart/rartland/config.h | 4 ---- keyboards/rart/rartland/info.json | 5 +++++ keyboards/rart/rartpad/config.h | 3 --- keyboards/rart/rartpad/info.json | 6 ++++++ keyboards/rate/pistachio_mp/config.h | 6 ------ keyboards/rate/pistachio_mp/info.json | 5 +++++ keyboards/rate/pistachio_pro/config.h | 4 ---- keyboards/rate/pistachio_pro/info.json | 5 +++++ keyboards/redox_media/config.h | 3 --- keyboards/redox_media/info.json | 5 +++++ keyboards/reviung/reviung5/config.h | 6 ------ keyboards/reviung/reviung5/info.json | 5 +++++ keyboards/rgbkb/mun/config.h | 4 ---- keyboards/rgbkb/mun/rev1/info.json | 6 ++++++ keyboards/rgbkb/pan/rev1/32a/config.h | 3 +-- keyboards/rgbkb/pan/rev1/32a/info.json | 8 +++++++- keyboards/rgbkb/pan/rev1/proton_c/config.h | 3 +-- keyboards/rgbkb/pan/rev1/proton_c/info.json | 8 +++++++- keyboards/rgbkb/sol/rev1/config.h | 4 ---- keyboards/rgbkb/sol/rev1/info.json | 5 +++++ keyboards/rgbkb/sol3/config.h | 8 -------- keyboards/rgbkb/sol3/rev1/info.json | 18 +++++++++++++++++- keyboards/rgbkb/zen/rev2/config.h | 3 --- keyboards/rgbkb/zen/rev2/info.json | 5 +++++ keyboards/rgbkb/zygomorph/rev1/config.h | 3 --- keyboards/rgbkb/zygomorph/rev1/info.json | 5 +++++ keyboards/ristretto/config.h | 3 --- keyboards/ristretto/info.json | 5 +++++ keyboards/rmi_kb/chevron/config.h | 6 ------ keyboards/rmi_kb/chevron/info.json | 5 +++++ keyboards/rmi_kb/herringbone/pro/config.h | 4 ---- keyboards/rmi_kb/herringbone/pro/info.json | 5 +++++ keyboards/rmi_kb/squishytkl/config.h | 8 -------- keyboards/rmi_kb/squishytkl/info.json | 5 +++++ keyboards/rmi_kb/wete/v2/config.h | 4 ---- keyboards/rmi_kb/wete/v2/info.json | 5 +++++ keyboards/rmkeebs/rm_numpad/config.h | 4 ---- keyboards/rmkeebs/rm_numpad/info.json | 5 +++++ keyboards/rocketboard_16/config.h | 6 ------ keyboards/rocketboard_16/info.json | 6 ++++++ keyboards/rotr/config.h | 8 -------- keyboards/rotr/info.json | 5 +++++ keyboards/rubi/config.h | 3 --- keyboards/rubi/info.json | 5 +++++ keyboards/rura66/rev1/config.h | 4 ---- 55 files changed, 157 insertions(+), 122 deletions(-) diff --git a/keyboards/rainkeebs/rainkeeb/config.h b/keyboards/rainkeebs/rainkeeb/config.h index 4614d50da82a..d26c7024d943 100644 --- a/keyboards/rainkeebs/rainkeeb/config.h +++ b/keyboards/rainkeebs/rainkeeb/config.h @@ -28,7 +28,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* encoder pads */ -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B6 } diff --git a/keyboards/rainkeebs/rainkeeb/info.json b/keyboards/rainkeebs/rainkeeb/info.json index 34705a980a50..bddacf6ddb17 100644 --- a/keyboards/rainkeebs/rainkeeb/info.json +++ b/keyboards/rainkeebs/rainkeeb/info.json @@ -8,6 +8,11 @@ "pid": "0x726B", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B6"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/rart/rart4x4/config.h b/keyboards/rart/rart4x4/config.h index 6a050234236b..d884b1268083 100644 --- a/keyboards/rart/rart4x4/config.h +++ b/keyboards/rart/rart4x4/config.h @@ -31,9 +31,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS_PAD_A { F6, D7 } -#define ENCODERS_PAD_B { F5, E6 } - #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/rart/rart4x4/info.json b/keyboards/rart/rart4x4/info.json index 1b01a4d22625..ac3014fe7a14 100644 --- a/keyboards/rart/rart4x4/info.json +++ b/keyboards/rart/rart4x4/info.json @@ -8,6 +8,12 @@ "pid": "0x0004", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F6", "pin_b": "F5"}, + {"pin_a": "D7", "pin_b": "E6"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "community_layouts": ["ortho_4x4"], diff --git a/keyboards/rart/rart75/config.h b/keyboards/rart/rart75/config.h index 14d8f62893cc..eb5b0be42272 100644 --- a/keyboards/rart/rart75/config.h +++ b/keyboards/rart/rart75/config.h @@ -30,6 +30,3 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define ENCODERS_PAD_A { E6 } -#define ENCODERS_PAD_B { B0 } diff --git a/keyboards/rart/rart75/info.json b/keyboards/rart/rart75/info.json index 81781cdb7e5b..40c5f39bebb9 100644 --- a/keyboards/rart/rart75/info.json +++ b/keyboards/rart/rart75/info.json @@ -8,6 +8,11 @@ "pid": "0x0075", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E6", "pin_b": "B0"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/rart/rart75hs/config.h b/keyboards/rart/rart75hs/config.h index f6fa7bf18c51..f6817e71cea3 100644 --- a/keyboards/rart/rart75hs/config.h +++ b/keyboards/rart/rart75hs/config.h @@ -31,9 +31,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS_PAD_A { C1 } -#define ENCODERS_PAD_B { C2 } - #define RGB_DI_PIN C0 #ifdef RGB_DI_PIN #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/rart/rart75hs/info.json b/keyboards/rart/rart75hs/info.json index a7ac977112b9..27984a03d75c 100644 --- a/keyboards/rart/rart75hs/info.json +++ b/keyboards/rart/rart75hs/info.json @@ -8,6 +8,11 @@ "pid": "0x5575", "device_version": "0.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "C1", "pin_b": "C2"} + ] + }, "indicators": { "caps_lock": "D4", "on_state": 0 diff --git a/keyboards/rart/rart75m/config.h b/keyboards/rart/rart75m/config.h index 1bb4ae526358..0b08f0322f27 100644 --- a/keyboards/rart/rart75m/config.h +++ b/keyboards/rart/rart75m/config.h @@ -31,10 +31,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C7, B3, B1, B0, D3, D2 } #define MATRIX_COL_PINS { B2, D4, F0, C6, F1, D7, F4, E6, F5, B4, F6, B5, F7, B6 } -#define ENCODERS_PAD_B { B7 } -#define ENCODERS_PAD_A { D6 } -#define ENCODER_RESOLUTION 2 //default/suggested - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rart/rart75m/info.json b/keyboards/rart/rart75m/info.json index 094bb55b8d0d..1d0f0e235804 100644 --- a/keyboards/rart/rart75m/info.json +++ b/keyboards/rart/rart75m/info.json @@ -8,6 +8,11 @@ "pid": "0x6075", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B7", "pin_b": "D6", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/rart/rartland/config.h b/keyboards/rart/rartland/config.h index facb9f1486ac..aee0fdd86293 100644 --- a/keyboards/rart/rartland/config.h +++ b/keyboards/rart/rartland/config.h @@ -31,10 +31,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B4, A7, A5, A6, C3 } #define MATRIX_COL_PINS { B0, A1, B1, A2, B2, A3, B3, A4, C7, C6, D0, C5, D1, C4 } -#define ENCODERS_PAD_B { D5 } -#define ENCODERS_PAD_A { C2 } -#define ENCODER_RESOLUTION 2 //default/suggested - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rart/rartland/info.json b/keyboards/rart/rartland/info.json index 8dbc85f13f98..5cfc6b7b70ef 100644 --- a/keyboards/rart/rartland/info.json +++ b/keyboards/rart/rartland/info.json @@ -8,6 +8,11 @@ "pid": "0x6065", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D5", "pin_b": "C2", "resolution": 2} + ] + }, "indicators": { "caps_lock": "A0", "on_state": 0 diff --git a/keyboards/rart/rartpad/config.h b/keyboards/rart/rartpad/config.h index 5a8d6f7849c2..4a8e14be49f7 100644 --- a/keyboards/rart/rartpad/config.h +++ b/keyboards/rart/rartpad/config.h @@ -31,9 +31,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS_PAD_A { B3, F5 } -#define ENCODERS_PAD_B { B1, F4 } - #define RGB_DI_PIN F7 #ifdef RGB_DI_PIN #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/rart/rartpad/info.json b/keyboards/rart/rartpad/info.json index 03918a6886d8..016b0c49c833 100644 --- a/keyboards/rart/rartpad/info.json +++ b/keyboards/rart/rartpad/info.json @@ -8,6 +8,12 @@ "pid": "0x0050", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B1"}, + {"pin_a": "F5", "pin_b": "F4"} + ] + }, "indicators": { "caps_lock": "D7" }, diff --git a/keyboards/rate/pistachio_mp/config.h b/keyboards/rate/pistachio_mp/config.h index bdbe5de0da1c..948c87264a22 100644 --- a/keyboards/rate/pistachio_mp/config.h +++ b/keyboards/rate/pistachio_mp/config.h @@ -17,12 +17,6 @@ along with this program. If not, see . #pragma once - -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A {F4} -#define ENCODERS_PAD_B {F5} -#endif - /* * Keyboard Matrix Assignments * diff --git a/keyboards/rate/pistachio_mp/info.json b/keyboards/rate/pistachio_mp/info.json index e0ad3440a3f5..cab8ef68b423 100644 --- a/keyboards/rate/pistachio_mp/info.json +++ b/keyboards/rate/pistachio_mp/info.json @@ -8,6 +8,11 @@ "pid": "0xE212", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/rate/pistachio_pro/config.h b/keyboards/rate/pistachio_pro/config.h index 5f7185c9268a..b79e4dcbe3ef 100644 --- a/keyboards/rate/pistachio_pro/config.h +++ b/keyboards/rate/pistachio_pro/config.h @@ -17,10 +17,6 @@ along with this program. If not, see . #pragma once - -#define ENCODERS_PAD_A {D2} -#define ENCODERS_PAD_B {D3} - /* key matrix size */ #define MATRIX_ROWS 6 #define MATRIX_COLS 18 diff --git a/keyboards/rate/pistachio_pro/info.json b/keyboards/rate/pistachio_pro/info.json index 9a212a859bea..743ff18155ef 100644 --- a/keyboards/rate/pistachio_pro/info.json +++ b/keyboards/rate/pistachio_pro/info.json @@ -8,6 +8,11 @@ "pid": "0xF40C", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D3"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/redox_media/config.h b/keyboards/redox_media/config.h index 99fa148a0d3f..c39e49f375ee 100644 --- a/keyboards/redox_media/config.h +++ b/keyboards/redox_media/config.h @@ -29,6 +29,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define ENCODERS_PAD_A { F4 } -#define ENCODERS_PAD_B { F5 } diff --git a/keyboards/redox_media/info.json b/keyboards/redox_media/info.json index 2404812e7def..9f4442885c52 100644 --- a/keyboards/redox_media/info.json +++ b/keyboards/redox_media/info.json @@ -8,6 +8,11 @@ "pid": "0x0000", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, "split": { "soft_serial_pin": "D0" }, diff --git a/keyboards/reviung/reviung5/config.h b/keyboards/reviung/reviung5/config.h index 66552b7f97c3..aceb9655f6c8 100644 --- a/keyboards/reviung/reviung5/config.h +++ b/keyboards/reviung/reviung5/config.h @@ -36,12 +36,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Encoder */ -#define ENCODERS_PAD_A \ - { D0 } -#define ENCODERS_PAD_B \ - { D1 } - #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN # define RGBLED_NUM 4 diff --git a/keyboards/reviung/reviung5/info.json b/keyboards/reviung/reviung5/info.json index 8422e881172f..622c880a4292 100644 --- a/keyboards/reviung/reviung5/info.json +++ b/keyboards/reviung/reviung5/info.json @@ -8,6 +8,11 @@ "pid": "0x4F0D", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layout_aliases": { diff --git a/keyboards/rgbkb/mun/config.h b/keyboards/rgbkb/mun/config.h index 5fbfc1cbfd14..8f961078bd46 100644 --- a/keyboards/rgbkb/mun/config.h +++ b/keyboards/rgbkb/mun/config.h @@ -25,10 +25,6 @@ #define TOUCH_RESOLUTION 25 // sensitivity of swipes, lower=faster #define TOUCH_SEGMENTS 3 -/* Encoder Configuration */ -#define ENCODERS_PAD_A { B8, B9 } -#define ENCODERS_PAD_B { A14, A15 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rgbkb/mun/rev1/info.json b/keyboards/rgbkb/mun/rev1/info.json index 774fa27a9480..b68a1586c566 100644 --- a/keyboards/rgbkb/mun/rev1/info.json +++ b/keyboards/rgbkb/mun/rev1/info.json @@ -8,6 +8,12 @@ "pid": "0x3505", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B8", "pin_b": "A14"}, + {"pin_a": "B9", "pin_b": "A15"} + ] + }, "split": { "soft_serial_pin": "A9" }, diff --git a/keyboards/rgbkb/pan/rev1/32a/config.h b/keyboards/rgbkb/pan/rev1/32a/config.h index 103cb4e5f880..5e7c4babbd3d 100644 --- a/keyboards/rgbkb/pan/rev1/32a/config.h +++ b/keyboards/rgbkb/pan/rev1/32a/config.h @@ -18,6 +18,5 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D7, D1, D5, D6, C2 } #define MATRIX_COL_PINS { C3, C4, C5, C6, C7, A7, A6, A5, A4, A3, A2, A1, A0 } -#define ENCODERS_PAD_A { B0, D0 } -#define ENCODERS_PAD_B { B1, B2} + #define RGB_DI_PIN B3 diff --git a/keyboards/rgbkb/pan/rev1/32a/info.json b/keyboards/rgbkb/pan/rev1/32a/info.json index 32a75ca0fcbc..1f7ece37eb44 100644 --- a/keyboards/rgbkb/pan/rev1/32a/info.json +++ b/keyboards/rgbkb/pan/rev1/32a/info.json @@ -1,4 +1,10 @@ { "processor": "atmega32a", - "bootloader": "usbasploader" + "bootloader": "usbasploader", + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1"}, + {"pin_a": "D0", "pin_b": "B2"} + ] + } } diff --git a/keyboards/rgbkb/pan/rev1/proton_c/config.h b/keyboards/rgbkb/pan/rev1/proton_c/config.h index 988bf60eca1f..f25713b2be3c 100644 --- a/keyboards/rgbkb/pan/rev1/proton_c/config.h +++ b/keyboards/rgbkb/pan/rev1/proton_c/config.h @@ -18,6 +18,5 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { A15, B10, A14, A13, A7 } #define MATRIX_COL_PINS { A8, A6, B0, B1, B2, B4, B5, A1, A2, B3, B9, A10, A9 } -#define ENCODERS_PAD_A { B14, B11 } -#define ENCODERS_PAD_B { B15, B12 } + #define RGB_DI_PIN A3 diff --git a/keyboards/rgbkb/pan/rev1/proton_c/info.json b/keyboards/rgbkb/pan/rev1/proton_c/info.json index c06ffbaf069f..5fd7124b9c07 100644 --- a/keyboards/rgbkb/pan/rev1/proton_c/info.json +++ b/keyboards/rgbkb/pan/rev1/proton_c/info.json @@ -1,5 +1,11 @@ { "processor": "STM32F303", "bootloader": "stm32-dfu", - "board": "QMK_PROTON_C" + "board": "QMK_PROTON_C", + "encoder": { + "rotary": [ + {"pin_a": "B14", "pin_b": "B15"}, + {"pin_a": "B11", "pin_b": "B12"} + ] + } } diff --git a/keyboards/rgbkb/sol/rev1/config.h b/keyboards/rgbkb/sol/rev1/config.h index 48f341583d0d..fcef317e1ffe 100644 --- a/keyboards/rgbkb/sol/rev1/config.h +++ b/keyboards/rgbkb/sol/rev1/config.h @@ -29,7 +29,3 @@ along with this program. If not, see . #define RGB_MATRIX_LED_COUNT RGBLED_NUM #define RGB_MATRIX_CENTER { 112, 35 } - -// Encoder support -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D6 } diff --git a/keyboards/rgbkb/sol/rev1/info.json b/keyboards/rgbkb/sol/rev1/info.json index 4182ce4c03d1..eb742972b10f 100644 --- a/keyboards/rgbkb/sol/rev1/info.json +++ b/keyboards/rgbkb/sol/rev1/info.json @@ -8,6 +8,11 @@ "pid": "0x3060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D6"} + ] + }, "split": { "soft_serial_pin": "D3" }, diff --git a/keyboards/rgbkb/sol3/config.h b/keyboards/rgbkb/sol3/config.h index a4c7d1e30e3a..727947ef0b9e 100644 --- a/keyboards/rgbkb/sol3/config.h +++ b/keyboards/rgbkb/sol3/config.h @@ -28,14 +28,6 @@ #define TOUCH_RESOLUTION 25 // sensitivity of swipes, lower=faster #define TOUCH_SEGMENTS 3 -/* Encoder Configuration */ -// Matrix Entries k36/k35(E1SW>B13), k33/k32, k7/k28 -#define ENCODERS_PAD_A { A1, B10, A13 } -#define ENCODERS_PAD_B { A2, B11, B14 } -// Matrix Entries k72/k71(E5SW>B0), k69/k68, k43/k64 -#define ENCODERS_PAD_A_RIGHT { A1, C15, B3 } -#define ENCODERS_PAD_B_RIGHT { A2, C14, B13 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rgbkb/sol3/rev1/info.json b/keyboards/rgbkb/sol3/rev1/info.json index 76eaf07f0750..046a56f390c1 100644 --- a/keyboards/rgbkb/sol3/rev1/info.json +++ b/keyboards/rgbkb/sol3/rev1/info.json @@ -8,8 +8,24 @@ "pid": "0x3510", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A1", "pin_b": "A2"}, + {"pin_a": "B10", "pin_b": "B11"}, + {"pin_a": "A13", "pin_b": "B14"} + ] + }, "split": { - "soft_serial_pin": "A9" + "soft_serial_pin": "A9", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "A1", "pin_b": "A2"}, + {"pin_a": "C15", "pin_b": "C14"}, + {"pin_a": "B3", "pin_b": "B13"} + ] + } + } }, "processor": "STM32F303", "bootloader": "stm32-dfu", diff --git a/keyboards/rgbkb/zen/rev2/config.h b/keyboards/rgbkb/zen/rev2/config.h index 9ea7a3dc8fd3..85b6a68b79d4 100644 --- a/keyboards/rgbkb/zen/rev2/config.h +++ b/keyboards/rgbkb/zen/rev2/config.h @@ -22,9 +22,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C6, E6, B5, D7, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B3, B1, B2 } -#define ENCODERS_PAD_A { D4 } -#define ENCODERS_PAD_B { D2 } - #define RGB_DI_PIN B6 /* COL2ROW or ROW2COL */ diff --git a/keyboards/rgbkb/zen/rev2/info.json b/keyboards/rgbkb/zen/rev2/info.json index d308819a423d..cc25a74b730a 100644 --- a/keyboards/rgbkb/zen/rev2/info.json +++ b/keyboards/rgbkb/zen/rev2/info.json @@ -8,6 +8,11 @@ "pid": "0x3061", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "D2"} + ] + }, "split": { "soft_serial_pin": "D3" }, diff --git a/keyboards/rgbkb/zygomorph/rev1/config.h b/keyboards/rgbkb/zygomorph/rev1/config.h index b92bc6d73f07..df9875ed47a2 100644 --- a/keyboards/rgbkb/zygomorph/rev1/config.h +++ b/keyboards/rgbkb/zygomorph/rev1/config.h @@ -28,9 +28,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D7 } - /* ws2812 RGB LED */ #define RGB_DI_PIN B7 #ifndef RGBLIGHT_SPLIT_ENABLE diff --git a/keyboards/rgbkb/zygomorph/rev1/info.json b/keyboards/rgbkb/zygomorph/rev1/info.json index e44966dabfb1..7bf6fe4b0dc2 100644 --- a/keyboards/rgbkb/zygomorph/rev1/info.json +++ b/keyboards/rgbkb/zygomorph/rev1/info.json @@ -8,6 +8,11 @@ "pid": "0x3060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D7"} + ] + }, "split": { "soft_serial_pin": "D3" }, diff --git a/keyboards/ristretto/config.h b/keyboards/ristretto/config.h index 9759cc3f9a0e..290aad3ae70b 100644 --- a/keyboards/ristretto/config.h +++ b/keyboards/ristretto/config.h @@ -29,6 +29,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define ENCODERS_PAD_A { D4 } -#define ENCODERS_PAD_B { D6 } diff --git a/keyboards/ristretto/info.json b/keyboards/ristretto/info.json index 3425dc03e6f8..ac6d80c3c706 100644 --- a/keyboards/ristretto/info.json +++ b/keyboards/ristretto/info.json @@ -8,6 +8,11 @@ "pid": "0x7273", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "D6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/rmi_kb/chevron/config.h b/keyboards/rmi_kb/chevron/config.h index 0c9e3da4cadd..cd4c43391bb7 100644 --- a/keyboards/rmi_kb/chevron/config.h +++ b/keyboards/rmi_kb/chevron/config.h @@ -58,9 +58,3 @@ along with this program. If not, see . /* QoL improvements */ #define PERMISSIVE_HOLD #define IGNORE_MOD_TAP_INTERRUPT - -/* Encoder */ -#define ENCODERS_PAD_A { A0 } -#define ENCODERS_PAD_B { A1 } - -//#define ENCODER_DIRECTION_FLIP diff --git a/keyboards/rmi_kb/chevron/info.json b/keyboards/rmi_kb/chevron/info.json index 654da4ace8d5..bdca6506f1c5 100644 --- a/keyboards/rmi_kb/chevron/info.json +++ b/keyboards/rmi_kb/chevron/info.json @@ -8,6 +8,11 @@ "pid": "0xC4EE", "device_version": "0.1.2" }, + "encoder": { + "rotary": [ + {"pin_a": "A0", "pin_b": "A1"} + ] + }, "processor": "atmega32a", "bootloader": "usbasploader", "layouts": { diff --git a/keyboards/rmi_kb/herringbone/pro/config.h b/keyboards/rmi_kb/herringbone/pro/config.h index e6195dc87c5b..ddf1d3199d4f 100644 --- a/keyboards/rmi_kb/herringbone/pro/config.h +++ b/keyboards/rmi_kb/herringbone/pro/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* Encoder pin assignment */ -#define ENCODERS_PAD_A { C3 } -#define ENCODERS_PAD_B { C2 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/rmi_kb/herringbone/pro/info.json b/keyboards/rmi_kb/herringbone/pro/info.json index 6a365b17c113..5eebdf3b79cf 100644 --- a/keyboards/rmi_kb/herringbone/pro/info.json +++ b/keyboards/rmi_kb/herringbone/pro/info.json @@ -8,6 +8,11 @@ "pid": "0x440B", "device_version": "0.1.2" }, + "encoder": { + "rotary": [ + {"pin_a": "C3", "pin_b": "C2"} + ] + }, "processor": "atmega32a", "bootloader": "usbasploader", "layouts": { diff --git a/keyboards/rmi_kb/squishytkl/config.h b/keyboards/rmi_kb/squishytkl/config.h index 07ac58f75686..20e98b3d5332 100644 --- a/keyboards/rmi_kb/squishytkl/config.h +++ b/keyboards/rmi_kb/squishytkl/config.h @@ -79,11 +79,3 @@ along with this program. If not, see . /* QoL improvements */ #define PERMISSIVE_HOLD #define IGNORE_MOD_TAP_INTERRUPT - -/* Rotary encoder */ -#define ENCODERS_PAD_A { B6 } -#define ENCODERS_PAD_B { B7 } - -#define ENCODER_RESOLUTION 1 - -//#define ENCODER_DIRECTION_FLIP diff --git a/keyboards/rmi_kb/squishytkl/info.json b/keyboards/rmi_kb/squishytkl/info.json index febd39bdf5cd..17236053cafe 100644 --- a/keyboards/rmi_kb/squishytkl/info.json +++ b/keyboards/rmi_kb/squishytkl/info.json @@ -8,6 +8,11 @@ "pid": "0x00B1", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B7", "resolution": 1} + ] + }, "processor": "STM32F103", "bootloader": "stm32duino", "layouts": { diff --git a/keyboards/rmi_kb/wete/v2/config.h b/keyboards/rmi_kb/wete/v2/config.h index 194b0c9511bd..baf134e5e92d 100644 --- a/keyboards/rmi_kb/wete/v2/config.h +++ b/keyboards/rmi_kb/wete/v2/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Encoder pins */ -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D1 } - #define RGBLIGHT_LAYERS #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF diff --git a/keyboards/rmi_kb/wete/v2/info.json b/keyboards/rmi_kb/wete/v2/info.json index d1aa78333692..c4773046582b 100644 --- a/keyboards/rmi_kb/wete/v2/info.json +++ b/keyboards/rmi_kb/wete/v2/info.json @@ -8,6 +8,11 @@ "pid": "0x00B3", "device_version": "35.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/rmkeebs/rm_numpad/config.h b/keyboards/rmkeebs/rm_numpad/config.h index 6988284d9445..c2462c161990 100644 --- a/keyboards/rmkeebs/rm_numpad/config.h +++ b/keyboards/rmkeebs/rm_numpad/config.h @@ -36,10 +36,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* define encoder pins */ -#define ENCODERS_PAD_A { D7 } -#define ENCODERS_PAD_B { D4 } - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/rmkeebs/rm_numpad/info.json b/keyboards/rmkeebs/rm_numpad/info.json index b5638b1829c2..520829d07e21 100644 --- a/keyboards/rmkeebs/rm_numpad/info.json +++ b/keyboards/rmkeebs/rm_numpad/info.json @@ -8,6 +8,11 @@ "pid": "0x524E", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D7", "pin_b": "D4"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["numpad_6x4", "ortho_6x4"], diff --git a/keyboards/rocketboard_16/config.h b/keyboards/rocketboard_16/config.h index 29db0066eb56..b6d39fd63dc3 100644 --- a/keyboards/rocketboard_16/config.h +++ b/keyboards/rocketboard_16/config.h @@ -43,12 +43,6 @@ along with this program. If not, see . // Allows for rotary encoder volume control #define TAP_CODE_DELAY 20 -/* Encoder stuff */ -#define ENCODERS_PAD_A \ - { A0, A2 } -#define ENCODERS_PAD_B \ - { A1, A3 } - #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE diff --git a/keyboards/rocketboard_16/info.json b/keyboards/rocketboard_16/info.json index 4e81d951a7b0..793bad257cd0 100644 --- a/keyboards/rocketboard_16/info.json +++ b/keyboards/rocketboard_16/info.json @@ -8,6 +8,12 @@ "pid": "0xFF16", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "A0", "pin_b": "A1"}, + {"pin_a": "A2", "pin_b": "A3"} + ] + }, "bootmagic": { "matrix": [4, 1] }, diff --git a/keyboards/rotr/config.h b/keyboards/rotr/config.h index 5acc8ffa5a6c..65a32fc35517 100644 --- a/keyboards/rotr/config.h +++ b/keyboards/rotr/config.h @@ -5,14 +5,6 @@ #define MATRIX_ROW_PINS { E6 } #define MATRIX_COL_PINS { D1, D0, D4 } -/*Rotary Encoder Pins*/ -#define ENCODERS_PAD_A { C6 } -#define ENCODERS_PAD_B { D7 } - -/*Sets the number of pulses per increment*/ -#define ENCODER_RESOLUTION 2 - - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rotr/info.json b/keyboards/rotr/info.json index 2bc5e96058eb..b893720ddfe1 100644 --- a/keyboards/rotr/info.json +++ b/keyboards/rotr/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "D7", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/rubi/config.h b/keyboards/rubi/config.h index 69ae795845d3..d80fa7ec35cc 100644 --- a/keyboards/rubi/config.h +++ b/keyboards/rubi/config.h @@ -31,9 +31,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { B3, B2, B1, F7 } -#define ENCODERS_PAD_A { D7 } -#define ENCODERS_PAD_B { D6 } - /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rubi/info.json b/keyboards/rubi/info.json index b8ad94479212..c9120a2f483b 100644 --- a/keyboards/rubi/info.json +++ b/keyboards/rubi/info.json @@ -8,6 +8,11 @@ "pid": "0x5242", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D7", "pin_b": "D6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/rura66/rev1/config.h b/keyboards/rura66/rev1/config.h index 3581b8adaabd..1a6ca8ac73c1 100644 --- a/keyboards/rura66/rev1/config.h +++ b/keyboards/rura66/rev1/config.h @@ -64,10 +64,6 @@ along with this program. If not, see . /* Custom font */ #define OLED_FONT_H "keyboards/rura66/common/glcdfont.c" -/* Encorder */ -// #define ENCODERS_PAD_A { B6 } -// #define ENCODERS_PAD_B { B5 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ From 39a42eac71228ea0bc1bc551d1e33e8d3dd64215 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:35:54 +1100 Subject: [PATCH 22/31] Move encoder config to info.json, S --- .../sawnsprojects/krush/krush65/hotswap/config.h | 4 ---- .../sawnsprojects/krush/krush65/hotswap/info.json | 5 +++++ .../sawnsprojects/krush/krush65/solder/config.h | 4 ---- .../sawnsprojects/krush/krush65/solder/info.json | 5 +++++ keyboards/sck/gtm/config.h | 5 ----- keyboards/sck/gtm/info.json | 5 +++++ keyboards/sendyyeah/pix/config.h | 3 --- keyboards/sendyyeah/pix/info.json | 5 +++++ keyboards/sergiopoverony/creator_pro/config.h | 7 ------- keyboards/sergiopoverony/creator_pro/info.json | 5 +++++ keyboards/sidderskb/majbritt/rev2/config.h | 3 --- keyboards/sidderskb/majbritt/rev2/info.json | 5 +++++ keyboards/sneakbox/aliceclone/config.h | 6 ------ keyboards/sneakbox/aliceclone/info.json | 5 +++++ keyboards/sneakbox/aliceclonergb/config.h | 6 ------ keyboards/sneakbox/aliceclonergb/info.json | 5 +++++ keyboards/sneakbox/ava/config.h | 6 ------ keyboards/sneakbox/ava/info.json | 5 +++++ keyboards/sneakbox/disarray/ortho/config.h | 6 ------ keyboards/sneakbox/disarray/ortho/info.json | 5 +++++ keyboards/sneakbox/disarray/staggered/config.h | 6 ------ keyboards/sneakbox/disarray/staggered/info.json | 5 +++++ keyboards/sofle/keyhive/config.h | 7 ------- keyboards/sofle/keyhive/info.json | 14 +++++++++++++- keyboards/sofle/rev1/config.h | 7 ------- keyboards/sofle/rev1/info.json | 14 +++++++++++++- keyboards/spacey/config.h | 4 ---- keyboards/spacey/info.json | 5 +++++ keyboards/splitkb/kyria/rev1/config.h | 9 --------- keyboards/splitkb/kyria/rev1/info.json | 14 ++++++++++++++ keyboards/splitkb/kyria/rev2/config.h | 9 --------- keyboards/splitkb/kyria/rev2/info.json | 14 ++++++++++++++ keyboards/splitkb/zima/config.h | 7 ------- keyboards/splitkb/zima/info.json | 5 +++++ keyboards/star75/config.h | 6 ------ keyboards/star75/info.json | 5 +++++ keyboards/stello65/beta/config.h | 6 ------ keyboards/stello65/beta/info.json | 5 +++++ keyboards/swiftrax/retropad/config.h | 3 --- keyboards/swiftrax/retropad/info.json | 5 +++++ keyboards/synapse/config.h | 6 ------ keyboards/synapse/info.json | 6 ++++++ keyboards/synthlabs/solo/config.h | 2 -- keyboards/synthlabs/solo/info.json | 5 +++++ 44 files changed, 145 insertions(+), 124 deletions(-) diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/config.h b/keyboards/sawnsprojects/krush/krush65/hotswap/config.h index 236de4d395ab..5318ea315e7c 100644 --- a/keyboards/sawnsprojects/krush/krush65/hotswap/config.h +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/config.h @@ -26,10 +26,6 @@ /* Encoders */ #define ENCODERS 1 - -#define ENCODERS_PAD_A { D1 } -#define ENCODERS_PAD_B { D2 } - #define ENCODERS_CW_KEY { { 12, 3 } } #define ENCODERS_CCW_KEY { { 12, 4 } } diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/info.json b/keyboards/sawnsprojects/krush/krush65/hotswap/info.json index 43faca443769..3872047ef8b9 100644 --- a/keyboards/sawnsprojects/krush/krush65/hotswap/info.json +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/info.json @@ -8,6 +8,11 @@ "pid": "0x5B31", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D2"} + ] + }, "indicators": { "caps_lock": "B0", "on_state": 0 diff --git a/keyboards/sawnsprojects/krush/krush65/solder/config.h b/keyboards/sawnsprojects/krush/krush65/solder/config.h index c834e35158fb..76f4acfbf6fb 100644 --- a/keyboards/sawnsprojects/krush/krush65/solder/config.h +++ b/keyboards/sawnsprojects/krush/krush65/solder/config.h @@ -23,10 +23,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* rotary */ -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { B3 } - #define RGB_DI_PIN F1 #ifdef RGB_DI_PIN #define RGBLED_NUM 20 diff --git a/keyboards/sawnsprojects/krush/krush65/solder/info.json b/keyboards/sawnsprojects/krush/krush65/solder/info.json index a0661b715a6d..96661272996c 100644 --- a/keyboards/sawnsprojects/krush/krush65/solder/info.json +++ b/keyboards/sawnsprojects/krush/krush65/solder/info.json @@ -8,6 +8,11 @@ "pid": "0x6B31", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "B3"} + ] + }, "indicators": { "caps_lock": "F0", "on_state": 0 diff --git a/keyboards/sck/gtm/config.h b/keyboards/sck/gtm/config.h index 15c3c5e114e1..f4961f224259 100644 --- a/keyboards/sck/gtm/config.h +++ b/keyboards/sck/gtm/config.h @@ -5,11 +5,6 @@ #define MATRIX_ROW_PINS { C4, C5, D1 } #define MATRIX_COL_PINS { B4, B5, B6, B7, C7, D0 } - -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D3 } -#define ENCODER_RESOLUTION 1 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sck/gtm/info.json b/keyboards/sck/gtm/info.json index 12ad6c917cff..3f254f2c778f 100644 --- a/keyboards/sck/gtm/info.json +++ b/keyboards/sck/gtm/info.json @@ -8,6 +8,11 @@ "pid": "0x6090", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D3", "resolution": 1} + ] + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/sendyyeah/pix/config.h b/keyboards/sendyyeah/pix/config.h index 03b5e62bb553..5bbc6a38f9c0 100644 --- a/keyboards/sendyyeah/pix/config.h +++ b/keyboards/sendyyeah/pix/config.h @@ -19,9 +19,6 @@ #define OLED_FONT_H "keymaps/default/glcdfont.c" #define OLED_TIMEOUT 600000 // Turn of after 10 minutes -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B3 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/sendyyeah/pix/info.json b/keyboards/sendyyeah/pix/info.json index 495a525a43c6..178d763b0dee 100644 --- a/keyboards/sendyyeah/pix/info.json +++ b/keyboards/sendyyeah/pix/info.json @@ -8,6 +8,11 @@ "pid": "0x4E34", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B3"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/sergiopoverony/creator_pro/config.h b/keyboards/sergiopoverony/creator_pro/config.h index 08941df1ac88..f1a5385a3cc0 100644 --- a/keyboards/sergiopoverony/creator_pro/config.h +++ b/keyboards/sergiopoverony/creator_pro/config.h @@ -20,10 +20,3 @@ #define RED_LED D0 #define BLUE_LED B5 #define GREEN_LED B6 - -/* encoder pins*/ -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D3 } -#define ENCODER_RESOLUTION 1 - - diff --git a/keyboards/sergiopoverony/creator_pro/info.json b/keyboards/sergiopoverony/creator_pro/info.json index 46889dbd1e68..9ac1a0a20c08 100644 --- a/keyboards/sergiopoverony/creator_pro/info.json +++ b/keyboards/sergiopoverony/creator_pro/info.json @@ -8,6 +8,11 @@ "pid": "0x0C00", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D3", "resolution": 1} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/sidderskb/majbritt/rev2/config.h b/keyboards/sidderskb/majbritt/rev2/config.h index 3eef4a6d17d8..c0c6902e3b6f 100644 --- a/keyboards/sidderskb/majbritt/rev2/config.h +++ b/keyboards/sidderskb/majbritt/rev2/config.h @@ -22,9 +22,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B0, B1, F7, C6, B5} #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, C7, B6, D6, B4, D4, D7, D5 ,D3, D2, D1, D0} -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B7 } - /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sidderskb/majbritt/rev2/info.json b/keyboards/sidderskb/majbritt/rev2/info.json index 7de72f1abfa0..2ba227e4a860 100644 --- a/keyboards/sidderskb/majbritt/rev2/info.json +++ b/keyboards/sidderskb/majbritt/rev2/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/sneakbox/aliceclone/config.h b/keyboards/sneakbox/aliceclone/config.h index f1da1c329cea..cae120ac7e5e 100644 --- a/keyboards/sneakbox/aliceclone/config.h +++ b/keyboards/sneakbox/aliceclone/config.h @@ -17,12 +17,6 @@ along with this program. If not, see . #pragma once -/* encoder */ -/* #define NUMBER_OF_ENCODERS 1 */ -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } -#define ENCODER_RESOLUTION 1 - /* key matrix pins */ #define MATRIX_ROW_PINS { F1, E6, F4, B1, F5, B2, F6, B3, F7, B7 } #define MATRIX_COL_PINS { F0, D0, C7, C6, B6, B5, B4, D1 } diff --git a/keyboards/sneakbox/aliceclone/info.json b/keyboards/sneakbox/aliceclone/info.json index c2c0b011a30c..6890765f7f92 100644 --- a/keyboards/sneakbox/aliceclone/info.json +++ b/keyboards/sneakbox/aliceclone/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2", "resolution": 1} + ] + }, "bootmagic": { "matrix": [2, 0] }, diff --git a/keyboards/sneakbox/aliceclonergb/config.h b/keyboards/sneakbox/aliceclonergb/config.h index 3369c06fbad7..26bddb382a7a 100644 --- a/keyboards/sneakbox/aliceclonergb/config.h +++ b/keyboards/sneakbox/aliceclonergb/config.h @@ -17,12 +17,6 @@ along with this program. If not, see . #pragma once -/* encoder */ -/* #define NUMBER_OF_ENCODERS 1 */ -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } -#define ENCODER_RESOLUTION 1 - /* key matrix pins */ #define MATRIX_ROW_PINS { F1, E6, F4, B1, F5, B2, F6, B3, F7, B7 } #define MATRIX_COL_PINS { F0, D0, C7, C6, B6, B5, B4, D1 } diff --git a/keyboards/sneakbox/aliceclonergb/info.json b/keyboards/sneakbox/aliceclonergb/info.json index 02bf2c5e95a3..cb7226ae81be 100644 --- a/keyboards/sneakbox/aliceclonergb/info.json +++ b/keyboards/sneakbox/aliceclonergb/info.json @@ -8,6 +8,11 @@ "pid": "0x0006", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2", "resolution": 1} + ] + }, "indicators": { "caps_lock": "D6", "num_lock": "D4", diff --git a/keyboards/sneakbox/ava/config.h b/keyboards/sneakbox/ava/config.h index 1528744d69f8..23a01323059e 100644 --- a/keyboards/sneakbox/ava/config.h +++ b/keyboards/sneakbox/ava/config.h @@ -17,12 +17,6 @@ along with this program. If not, see . #pragma once -/* encoder */ -/* #define NUMBER_OF_ENCODERS 1 */ -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } -#define ENCODER_RESOLUTION 1 - /* key matrix pins */ #define MATRIX_ROW_PINS { F1, E6, F4, B1, F5, B2, F6, B3, B7 } #define MATRIX_COL_PINS { F0, D0, C7, C6, B6, B5, B4, D1 } diff --git a/keyboards/sneakbox/ava/info.json b/keyboards/sneakbox/ava/info.json index 2d07121a7a2d..723fe70fb95a 100644 --- a/keyboards/sneakbox/ava/info.json +++ b/keyboards/sneakbox/ava/info.json @@ -8,6 +8,11 @@ "pid": "0x0004", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2", "resolution": 1} + ] + }, "indicators": { "caps_lock": "D6", "num_lock": "D4" diff --git a/keyboards/sneakbox/disarray/ortho/config.h b/keyboards/sneakbox/disarray/ortho/config.h index f91a242b0825..78b024604c63 100644 --- a/keyboards/sneakbox/disarray/ortho/config.h +++ b/keyboards/sneakbox/disarray/ortho/config.h @@ -17,12 +17,6 @@ along with this program. If not, see . #pragma once -/* encoder */ -/* #define NUMBER_OF_ENCODERS 1 */ -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B2 } -#define ENCODER_RESOLUTION 1 - /* key matrix pins */ #define MATRIX_ROW_PINS { B7, D0, D1, D2, D3, B0} #define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0, E6} diff --git a/keyboards/sneakbox/disarray/ortho/info.json b/keyboards/sneakbox/disarray/ortho/info.json index 894e61c25620..65c8ff41d1e1 100644 --- a/keyboards/sneakbox/disarray/ortho/info.json +++ b/keyboards/sneakbox/disarray/ortho/info.json @@ -8,6 +8,11 @@ "pid": "0x0003", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2", "resolution": 1} + ] + }, "indicators": { "num_lock": "B1" }, diff --git a/keyboards/sneakbox/disarray/staggered/config.h b/keyboards/sneakbox/disarray/staggered/config.h index 9eb0f90cfd08..486442bcf1f3 100644 --- a/keyboards/sneakbox/disarray/staggered/config.h +++ b/keyboards/sneakbox/disarray/staggered/config.h @@ -17,12 +17,6 @@ along with this program. If not, see . #pragma once -/* encoder */ -/* #define NUMBER_OF_ENCODERS 1 */ -#define ENCODERS_PAD_A { B3 } -#define ENCODERS_PAD_B { B2 } -#define ENCODER_RESOLUTION 1 - /* key matrix pins */ #define MATRIX_ROW_PINS { B7, D0, D1, D2, D3} #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, E6} diff --git a/keyboards/sneakbox/disarray/staggered/info.json b/keyboards/sneakbox/disarray/staggered/info.json index 536ae84ea77e..1a788b77ec68 100644 --- a/keyboards/sneakbox/disarray/staggered/info.json +++ b/keyboards/sneakbox/disarray/staggered/info.json @@ -8,6 +8,11 @@ "pid": "0x0002", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B3", "pin_b": "B2", "resolution": 1} + ] + }, "indicators": { "num_lock": "B1" }, diff --git a/keyboards/sofle/keyhive/config.h b/keyboards/sofle/keyhive/config.h index 43edc5db9952..c65caad1deb5 100755 --- a/keyboards/sofle/keyhive/config.h +++ b/keyboards/sofle/keyhive/config.h @@ -26,13 +26,6 @@ #define DIODE_DIRECTION COL2ROW -// 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_RESOLUTIONS_RIGHT { 2 } // Left encoder seems to have double-output issue but right does not. - #define TAP_CODE_DELAY 10 // OLED settings diff --git a/keyboards/sofle/keyhive/info.json b/keyboards/sofle/keyhive/info.json index b8e0cccbab33..f1d76cb78895 100644 --- a/keyboards/sofle/keyhive/info.json +++ b/keyboards/sofle/keyhive/info.json @@ -6,8 +6,20 @@ "pid": "0x1287", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5", "resolution": 2} + ] + } + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/sofle/rev1/config.h b/keyboards/sofle/rev1/config.h index 8d928df4c6de..34886b3be1c0 100644 --- a/keyboards/sofle/rev1/config.h +++ b/keyboards/sofle/rev1/config.h @@ -7,11 +7,4 @@ #define TAPPING_TERM 100 -/* 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 2 - #define TAP_CODE_DELAY 10 diff --git a/keyboards/sofle/rev1/info.json b/keyboards/sofle/rev1/info.json index 911f90ccbcf0..4a113ec2f289 100644 --- a/keyboards/sofle/rev1/info.json +++ b/keyboards/sofle/rev1/info.json @@ -8,8 +8,20 @@ "pid": "0x0287", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4", "resolution": 2} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5", "resolution": 2} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/spacey/config.h b/keyboards/spacey/config.h index 53c7910f085a..411f2c257895 100644 --- a/keyboards/spacey/config.h +++ b/keyboards/spacey/config.h @@ -17,10 +17,6 @@ along with this program. If not, see . #pragma once - -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D1 } - /* * Keyboard Matrix Assignments * diff --git a/keyboards/spacey/info.json b/keyboards/spacey/info.json index fc6b1d1f3672..c24d46d753bd 100644 --- a/keyboards/spacey/info.json +++ b/keyboards/spacey/info.json @@ -8,6 +8,11 @@ "pid": "0x2045", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/splitkb/kyria/rev1/config.h b/keyboards/splitkb/kyria/rev1/config.h index 5c9c282e0007..8ca0d50ea65a 100644 --- a/keyboards/splitkb/kyria/rev1/config.h +++ b/keyboards/splitkb/kyria/rev1/config.h @@ -23,15 +23,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS \ { B6, B2, B3, B1, F7, F6, F5, F4 } -#define ENCODERS_PAD_A \ - { C6 } -#define ENCODERS_PAD_B \ - { B5 } -#define ENCODERS_PAD_A_RIGHT \ - { B5 } -#define ENCODERS_PAD_B_RIGHT \ - { C6 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/splitkb/kyria/rev1/info.json b/keyboards/splitkb/kyria/rev1/info.json index 86006546c790..895f9283ac1a 100644 --- a/keyboards/splitkb/kyria/rev1/info.json +++ b/keyboards/splitkb/kyria/rev1/info.json @@ -4,6 +4,20 @@ "pid": "0x9D9D", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "B5"} + ] + }, + "split": { + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B5", "pin_b": "C6"} + ] + } + } + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/splitkb/kyria/rev2/config.h b/keyboards/splitkb/kyria/rev2/config.h index e26e0cffda95..1799c6aa4969 100644 --- a/keyboards/splitkb/kyria/rev2/config.h +++ b/keyboards/splitkb/kyria/rev2/config.h @@ -27,15 +27,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS_RIGHT \ { B4, B5, B6, B2, B3, B1, F7, F6 } -#define ENCODERS_PAD_A \ - { F4 } -#define ENCODERS_PAD_B \ - { F5 } -#define ENCODERS_PAD_A_RIGHT \ - { F5 } -#define ENCODERS_PAD_B_RIGHT \ - { F4 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/splitkb/kyria/rev2/info.json b/keyboards/splitkb/kyria/rev2/info.json index e30432b7183f..d21d820804e0 100644 --- a/keyboards/splitkb/kyria/rev2/info.json +++ b/keyboards/splitkb/kyria/rev2/info.json @@ -4,6 +4,20 @@ "pid": "0x9D9D", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, + "split": { + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + } + } + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/splitkb/zima/config.h b/keyboards/splitkb/zima/config.h index 0cb93e77af5c..c06c192e0d10 100644 --- a/keyboards/splitkb/zima/config.h +++ b/keyboards/splitkb/zima/config.h @@ -17,9 +17,6 @@ along with this program. If not, see . #pragma once -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { D7 } - #define AUDIO_PIN B6 #define AUDIO_CLICKY #define NO_MUSIC_MODE @@ -47,7 +44,3 @@ along with this program. If not, see . #define DRV_GREETING alert_750ms #define DRV_MODE_DEFAULT buzz -// EC11K encoders have a different resolution than other EC11 encoders. -// When using the default resolution of 4, if you notice your encoder skipping -// every other tick, lower the resolution to 2. -#define ENCODER_RESOLUTION 2 diff --git a/keyboards/splitkb/zima/info.json b/keyboards/splitkb/zima/info.json index ab1b8ae020fb..077421904c08 100644 --- a/keyboards/splitkb/zima/info.json +++ b/keyboards/splitkb/zima/info.json @@ -8,6 +8,11 @@ "pid": "0xF75B", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "D7", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "matrix_pins": { diff --git a/keyboards/star75/config.h b/keyboards/star75/config.h index 2b69934ff2e1..e6162107051a 100644 --- a/keyboards/star75/config.h +++ b/keyboards/star75/config.h @@ -11,12 +11,6 @@ SPDX-License-Identifier: GPL-2.0-or-later */ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* encoder definitions */ -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B1 } -#endif - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/star75/info.json b/keyboards/star75/info.json index 516fcb7a72e3..4bf206e4e588 100644 --- a/keyboards/star75/info.json +++ b/keyboards/star75/info.json @@ -8,6 +8,11 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layout_aliases": { diff --git a/keyboards/stello65/beta/config.h b/keyboards/stello65/beta/config.h index de6dd2ff2079..1d1d76dda4db 100644 --- a/keyboards/stello65/beta/config.h +++ b/keyboards/stello65/beta/config.h @@ -20,15 +20,9 @@ /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } -#define ENCODER_RESOLUTION 2 - #define ENCODERS 1 #define ENCODERS_CW_KEY { { 4, 7 } } #define ENCODERS_CCW_KEY { { 4, 6 } } -#endif /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/stello65/beta/info.json b/keyboards/stello65/beta/info.json index b38ff6e3f37f..d4e73eba1d72 100644 --- a/keyboards/stello65/beta/info.json +++ b/keyboards/stello65/beta/info.json @@ -8,6 +8,11 @@ "pid": "0x0003", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2", "resolution": 2} + ] + }, "indicators": { "caps_lock": "B3" }, diff --git a/keyboards/swiftrax/retropad/config.h b/keyboards/swiftrax/retropad/config.h index 6cf8c0d22b20..f963856c97cc 100644 --- a/keyboards/swiftrax/retropad/config.h +++ b/keyboards/swiftrax/retropad/config.h @@ -23,9 +23,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C7, C6, B5 } #define MATRIX_COL_PINS { B4, D2 } -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D1 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/swiftrax/retropad/info.json b/keyboards/swiftrax/retropad/info.json index 700ec883b88b..ea43a71b12b4 100644 --- a/keyboards/swiftrax/retropad/info.json +++ b/keyboards/swiftrax/retropad/info.json @@ -8,6 +8,11 @@ "pid": "0xEB0C", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "bootmagic": { "matrix": [1, 0] }, diff --git a/keyboards/synapse/config.h b/keyboards/synapse/config.h index 2ba435289af0..f9b40cedee9b 100644 --- a/keyboards/synapse/config.h +++ b/keyboards/synapse/config.h @@ -26,10 +26,4 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* ROTARY ENCODERS */ -#define ENCODERS_PAD_A \ - { D7, C7 } -#define ENCODERS_PAD_B \ - { D6, C6 } - #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/synapse/info.json b/keyboards/synapse/info.json index 55860f9f2648..ff629b48c552 100644 --- a/keyboards/synapse/info.json +++ b/keyboards/synapse/info.json @@ -8,6 +8,12 @@ "pid": "0x5359", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D7", "pin_b": "D6"}, + {"pin_a": "C7", "pin_b": "C6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/synthlabs/solo/config.h b/keyboards/synthlabs/solo/config.h index f38b8646dccd..725776986c11 100644 --- a/keyboards/synthlabs/solo/config.h +++ b/keyboards/synthlabs/solo/config.h @@ -5,8 +5,6 @@ #define ENCODERS 1 -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B3 } #define ENCODERS_CW_KEY { { 2, 1 } } #define ENCODERS_CCW_KEY { { 0, 1 } } diff --git a/keyboards/synthlabs/solo/info.json b/keyboards/synthlabs/solo/info.json index 23566e95583a..14d39d63ccdf 100644 --- a/keyboards/synthlabs/solo/info.json +++ b/keyboards/synthlabs/solo/info.json @@ -17,6 +17,11 @@ "pid": "0x3031", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3"} + ] + }, "bootmagic": { "matrix": [1, 1] }, From d0a65ac818c86a3781742070c8992c926f4003d4 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:36:01 +1100 Subject: [PATCH 23/31] Move encoder config to info.json, T --- .../takashicompany/center_enter/config.h | 4 -- .../takashicompany/center_enter/info.json | 5 +++ keyboards/takashicompany/compacx/config.h | 3 -- keyboards/takashicompany/compacx/info.json | 6 +++ keyboards/takashicompany/dogtag/config.h | 3 -- keyboards/takashicompany/dogtag/info.json | 5 +++ keyboards/takashicompany/qoolee/config.h | 4 -- keyboards/takashicompany/qoolee/info.json | 5 +++ .../takashicompany/spreadwriter/config.h | 7 ---- .../takashicompany/spreadwriter/info.json | 5 +++ keyboards/taleguers/taleguers75/config.h | 3 -- keyboards/taleguers/taleguers75/info.json | 5 +++ keyboards/terrazzo/config.h | 38 ------------------- keyboards/terrazzo/info.json | 7 ++++ keyboards/tetris/config.h | 3 -- keyboards/tetris/info.json | 6 +++ keyboards/themadnoodle/ncc1701kb/v2/config.h | 4 -- keyboards/themadnoodle/ncc1701kb/v2/info.json | 5 +++ keyboards/themadnoodle/noodlepad/config.h | 4 -- keyboards/themadnoodle/noodlepad/info.json | 5 +++ keyboards/thepanduuh/degenpad/config.h | 3 -- keyboards/thepanduuh/degenpad/info.json | 5 +++ keyboards/tkc/portico75/config.h | 9 ----- keyboards/tkc/portico75/info.json | 5 +++ keyboards/tkw/grandiceps/config.h | 3 -- keyboards/tkw/grandiceps/info.json | 5 +++ keyboards/tkw/stoutgat/v1/config.h | 3 -- keyboards/tkw/stoutgat/v1/info.json | 6 +++ keyboards/tkw/stoutgat/v2/config.h | 3 -- keyboards/tkw/stoutgat/v2/info.json | 6 +++ keyboards/tominabox1/bigboy/config.h | 4 -- keyboards/tominabox1/bigboy/info.json | 5 +++ keyboards/tominabox1/le_chiffre/he/config.h | 4 -- keyboards/tominabox1/le_chiffre/he/info.json | 5 +++ keyboards/tominabox1/le_chiffre/rev1/config.h | 4 -- .../tominabox1/le_chiffre/rev1/info.json | 5 +++ keyboards/tominabox1/le_chiffre/rev2/config.h | 4 -- .../tominabox1/le_chiffre/rev2/info.json | 5 +++ keyboards/torn/config.h | 5 --- keyboards/torn/info.json | 5 +++ keyboards/tunks/ergo33/config.h | 3 -- keyboards/tunks/ergo33/info.json | 5 +++ keyboards/tzarc/djinn/config.h | 14 ------- keyboards/tzarc/djinn/info.json | 14 ++++++- 44 files changed, 124 insertions(+), 133 deletions(-) delete mode 100644 keyboards/takashicompany/spreadwriter/config.h diff --git a/keyboards/takashicompany/center_enter/config.h b/keyboards/takashicompany/center_enter/config.h index 7407855ff242..f77a42f59f13 100644 --- a/keyboards/takashicompany/center_enter/config.h +++ b/keyboards/takashicompany/center_enter/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODER_RESOLUTION 1 -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D1 } - #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN # define RGBLED_NUM 6 diff --git a/keyboards/takashicompany/center_enter/info.json b/keyboards/takashicompany/center_enter/info.json index edc871c31755..7c268e3f6321 100644 --- a/keyboards/takashicompany/center_enter/info.json +++ b/keyboards/takashicompany/center_enter/info.json @@ -8,6 +8,11 @@ "pid": "0x0012", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D1", "resolution": 1} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/takashicompany/compacx/config.h b/keyboards/takashicompany/compacx/config.h index 848c5fb4e5eb..3f6f0115242b 100644 --- a/keyboards/takashicompany/compacx/config.h +++ b/keyboards/takashicompany/compacx/config.h @@ -34,9 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { E6, B6 } -#define ENCODERS_PAD_B { B4, B5 } - #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN # define RGBLED_NUM 12 diff --git a/keyboards/takashicompany/compacx/info.json b/keyboards/takashicompany/compacx/info.json index 08cd4a101090..bcd4489a98c7 100644 --- a/keyboards/takashicompany/compacx/info.json +++ b/keyboards/takashicompany/compacx/info.json @@ -8,6 +8,12 @@ "pid": "0x0014", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E6", "pin_b": "B4"}, + {"pin_a": "B6", "pin_b": "B5"} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/takashicompany/dogtag/config.h b/keyboards/takashicompany/dogtag/config.h index 607afc15b9d5..4048cb9bf63f 100644 --- a/keyboards/takashicompany/dogtag/config.h +++ b/keyboards/takashicompany/dogtag/config.h @@ -37,9 +37,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { D4 } -#define ENCODERS_PAD_B { C6 } - #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN # define RGBLED_NUM 4 * 2 diff --git a/keyboards/takashicompany/dogtag/info.json b/keyboards/takashicompany/dogtag/info.json index cf6fd6713583..caa007fcc5d8 100644 --- a/keyboards/takashicompany/dogtag/info.json +++ b/keyboards/takashicompany/dogtag/info.json @@ -8,6 +8,11 @@ "pid": "0x0018", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "C6"} + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/takashicompany/qoolee/config.h b/keyboards/takashicompany/qoolee/config.h index 1e050f5defbc..726f4507c89f 100644 --- a/keyboards/takashicompany/qoolee/config.h +++ b/keyboards/takashicompany/qoolee/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODER_RESOLUTION 1 -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D1 } - #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN # define RGBLED_NUM 6 diff --git a/keyboards/takashicompany/qoolee/info.json b/keyboards/takashicompany/qoolee/info.json index b7ed85676f44..6f92e86c8823 100644 --- a/keyboards/takashicompany/qoolee/info.json +++ b/keyboards/takashicompany/qoolee/info.json @@ -8,6 +8,11 @@ "pid": "0x0013", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D1", "resolution": 1} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/takashicompany/spreadwriter/config.h b/keyboards/takashicompany/spreadwriter/config.h deleted file mode 100644 index 6bd03e2221e0..000000000000 --- a/keyboards/takashicompany/spreadwriter/config.h +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2022 takashicompany (@takashicompany) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#define ENCODERS_PAD_A { D1 } -#define ENCODERS_PAD_B { D0 } diff --git a/keyboards/takashicompany/spreadwriter/info.json b/keyboards/takashicompany/spreadwriter/info.json index 86f250966a31..16450db96e3d 100644 --- a/keyboards/takashicompany/spreadwriter/info.json +++ b/keyboards/takashicompany/spreadwriter/info.json @@ -40,6 +40,11 @@ "pid": "0x0023", "vid": "0x7463" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"} + ] + }, "rgblight": { "led_count": 53, "pin": "D3", diff --git a/keyboards/taleguers/taleguers75/config.h b/keyboards/taleguers/taleguers75/config.h index e3c03f7afe4f..ac0ea7c3389a 100644 --- a/keyboards/taleguers/taleguers75/config.h +++ b/keyboards/taleguers/taleguers75/config.h @@ -24,9 +24,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B6 } -#define ENCODERS_PAD_B { B5 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/taleguers/taleguers75/info.json b/keyboards/taleguers/taleguers75/info.json index 62761093d742..936086beb3df 100644 --- a/keyboards/taleguers/taleguers75/info.json +++ b/keyboards/taleguers/taleguers75/info.json @@ -8,6 +8,11 @@ "pid": "0x0075", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B5"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h index 75ca5885a1e2..6c0cbb80b9c8 100644 --- a/keyboards/terrazzo/config.h +++ b/keyboards/terrazzo/config.h @@ -25,44 +25,6 @@ #define DIODE_DIRECTION COL2ROW -/* ROTARY ENCODERS */ - -/* 4 encoder positions are supported. With multiple -encoder support when using the extra pins of -Elite-C controller. - -Use the following configuration guides for your -encoder layout. */ - -/* PRO MICRO CONFIGURATIONS */ - -/* If using a Pro Micro, only 1 encoder may be used, -and only in the top or bottom position. -Top and bottom encoders share the same net, -so there is only one configuration. */ - -/* TOP or BOTTOM */ -// #define ENCODERS_PAD_A { C6 } -// #define ENCODERS_PAD_B { D4 } - -/* ELITE-C ONLY CONFIGURATIONS */ - -/* TOP 3 - Default configuration */ -#define ENCODERS_PAD_A { C6 , B7, C7 } -#define ENCODERS_PAD_B { D4 , D5, F1 } - -/* BOTTOM 3 */ -// #define ENCODERS_PAD_A { B7, C7, C6 } -// #define ENCODERS_PAD_B { D5, F1, D4 } - -/* BOTTOM 2 */ -// #define ENCODERS_PAD_A { C7, C6 } -// #define ENCODERS_PAD_B { F1, D4 } - - -#define ENCODER_RESOLUTION 2 - #ifdef LED_MATRIX_ENABLE #define LED_DRIVER_ADDR_1 0x74 diff --git a/keyboards/terrazzo/info.json b/keyboards/terrazzo/info.json index 36382c46484b..fb59374d1d7e 100644 --- a/keyboards/terrazzo/info.json +++ b/keyboards/terrazzo/info.json @@ -8,6 +8,13 @@ "pid": "0x545A", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "D4", "resolution": 2}, + {"pin_a": "B7", "pin_b": "D5", "resolution": 2}, + {"pin_a": "C7", "pin_b": "F1", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/tetris/config.h b/keyboards/tetris/config.h index af42a6254331..5cb9e23c57b0 100755 --- a/keyboards/tetris/config.h +++ b/keyboards/tetris/config.h @@ -20,9 +20,6 @@ #define NO_MUSIC_MODE #endif -#define ENCODERS_PAD_A { D1,F1 } -#define ENCODERS_PAD_B { D0,F0 } - #define RGB_DI_PIN F5 #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/tetris/info.json b/keyboards/tetris/info.json index c0b9742dd014..382c4b28618e 100644 --- a/keyboards/tetris/info.json +++ b/keyboards/tetris/info.json @@ -8,6 +8,12 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"}, + {"pin_a": "F1", "pin_b": "F0"} + ] + }, "processor": "atmega32u4", "bootloader": "qmk-dfu", "layouts": { diff --git a/keyboards/themadnoodle/ncc1701kb/v2/config.h b/keyboards/themadnoodle/ncc1701kb/v2/config.h index 0349a424573d..a9b6cfc37df8 100644 --- a/keyboards/themadnoodle/ncc1701kb/v2/config.h +++ b/keyboards/themadnoodle/ncc1701kb/v2/config.h @@ -36,10 +36,6 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -/*Encoders */ -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D1 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/themadnoodle/ncc1701kb/v2/info.json b/keyboards/themadnoodle/ncc1701kb/v2/info.json index 9c1a9c8f5f91..63ebced12b96 100644 --- a/keyboards/themadnoodle/ncc1701kb/v2/info.json +++ b/keyboards/themadnoodle/ncc1701kb/v2/info.json @@ -8,6 +8,11 @@ "pid": "0x1701", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/themadnoodle/noodlepad/config.h b/keyboards/themadnoodle/noodlepad/config.h index 0349a424573d..a9b6cfc37df8 100644 --- a/keyboards/themadnoodle/noodlepad/config.h +++ b/keyboards/themadnoodle/noodlepad/config.h @@ -36,10 +36,6 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -/*Encoders */ -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D1 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/themadnoodle/noodlepad/info.json b/keyboards/themadnoodle/noodlepad/info.json index c6dc44ccec43..487680f13754 100644 --- a/keyboards/themadnoodle/noodlepad/info.json +++ b/keyboards/themadnoodle/noodlepad/info.json @@ -8,6 +8,11 @@ "pid": "0x1701", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/thepanduuh/degenpad/config.h b/keyboards/thepanduuh/degenpad/config.h index a2a171890d2a..49f53eff7ae3 100644 --- a/keyboards/thepanduuh/degenpad/config.h +++ b/keyboards/thepanduuh/degenpad/config.h @@ -21,8 +21,5 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D5, D6, D7, B4, B5, B6 } #define MATRIX_COL_PINS { F4, F5, B1, D3 } -#define ENCODERS_PAD_A { F1 } -#define ENCODERS_PAD_B { F0 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/thepanduuh/degenpad/info.json b/keyboards/thepanduuh/degenpad/info.json index ee19795db33b..999de9648c3d 100644 --- a/keyboards/thepanduuh/degenpad/info.json +++ b/keyboards/thepanduuh/degenpad/info.json @@ -8,6 +8,11 @@ "pid": "0x4447", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F1", "pin_b": "F0"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/tkc/portico75/config.h b/keyboards/tkc/portico75/config.h index c91329ccd3d8..04abd8bcc11f 100644 --- a/keyboards/tkc/portico75/config.h +++ b/keyboards/tkc/portico75/config.h @@ -23,15 +23,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS \ { F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, B3, B7 } -/*Rotary Encoder Pins*/ -#define ENCODERS_PAD_A \ - { B1 } -#define ENCODERS_PAD_B \ - { B2 } - -/*Sets the number of pulses per increment*/ -#define ENCODER_RESOLUTION 2 - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tkc/portico75/info.json b/keyboards/tkc/portico75/info.json index c84a742761e4..bac10fbe13eb 100644 --- a/keyboards/tkc/portico75/info.json +++ b/keyboards/tkc/portico75/info.json @@ -8,6 +8,11 @@ "pid": "0x0011", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B2", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 3, diff --git a/keyboards/tkw/grandiceps/config.h b/keyboards/tkw/grandiceps/config.h index 7c7c2dd940b2..16d91b69a2ea 100644 --- a/keyboards/tkw/grandiceps/config.h +++ b/keyboards/tkw/grandiceps/config.h @@ -28,9 +28,6 @@ #define MATRIX_IO_DELAY 5 #define TAP_CODE_DELAY 10 -#define ENCODERS_PAD_A { B14 } -#define ENCODERS_PAD_B { B15 } - #define RGB_DI_PIN B1 #define RGBLED_NUM 16 #define RGBLED_SPLIT { 8,8 } diff --git a/keyboards/tkw/grandiceps/info.json b/keyboards/tkw/grandiceps/info.json index 356d54e67a58..4d91a00c84bd 100644 --- a/keyboards/tkw/grandiceps/info.json +++ b/keyboards/tkw/grandiceps/info.json @@ -6,6 +6,11 @@ "vid": "0xFEED", "pid": "0x7812" }, + "encoder": { + "rotary": [ + {"pin_a": "B14", "pin_b": "B15"} + ] + }, "split": { "soft_serial_pin": "A15" }, diff --git a/keyboards/tkw/stoutgat/v1/config.h b/keyboards/tkw/stoutgat/v1/config.h index e069c29c86e3..1eda8feab415 100644 --- a/keyboards/tkw/stoutgat/v1/config.h +++ b/keyboards/tkw/stoutgat/v1/config.h @@ -21,8 +21,5 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D1, D0, A0, A1, A2 } #define MATRIX_COL_PINS { D6, D5, D7, C0, C1, C2, C3, C4, C5, C6, C7, A7, A6, A5, A4 } -#define ENCODERS_PAD_A { B4, B0 } -#define ENCODERS_PAD_B { B3, B1 } - #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tkw/stoutgat/v1/info.json b/keyboards/tkw/stoutgat/v1/info.json index 2a8814d840ad..e94e8968582d 100644 --- a/keyboards/tkw/stoutgat/v1/info.json +++ b/keyboards/tkw/stoutgat/v1/info.json @@ -8,6 +8,12 @@ "pid": "0x7811", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B3"}, + {"pin_a": "B0", "pin_b": "B1"} + ] + }, "processor": "atmega32a", "bootloader": "usbasploader", "community_layouts": ["65_iso", "65_ansi"], diff --git a/keyboards/tkw/stoutgat/v2/config.h b/keyboards/tkw/stoutgat/v2/config.h index 2594685f0543..8161a873e515 100644 --- a/keyboards/tkw/stoutgat/v2/config.h +++ b/keyboards/tkw/stoutgat/v2/config.h @@ -24,9 +24,6 @@ #define MATRIX_IO_DELAY 5 #define TAP_CODE_DELAY 10 -#define ENCODERS_PAD_A { B14, B12} -#define ENCODERS_PAD_B { B15, B13 } - #define RGB_DI_PIN B1 #define RGBLED_NUM 13 #define RGBLIGHT_LIMIT_VAL 120 diff --git a/keyboards/tkw/stoutgat/v2/info.json b/keyboards/tkw/stoutgat/v2/info.json index 94b09cade1b0..0b0877b38bda 100644 --- a/keyboards/tkw/stoutgat/v2/info.json +++ b/keyboards/tkw/stoutgat/v2/info.json @@ -8,6 +8,12 @@ "pid": "0x7811", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "B14", "pin_b": "B15"}, + {"pin_a": "B12", "pin_b": "B13"} + ] + }, "community_layouts": ["65_iso", "65_ansi"], "layouts": { "LAYOUT_encoder": { diff --git a/keyboards/tominabox1/bigboy/config.h b/keyboards/tominabox1/bigboy/config.h index 70d1b76bea66..b758c909d215 100755 --- a/keyboards/tominabox1/bigboy/config.h +++ b/keyboards/tominabox1/bigboy/config.h @@ -16,10 +16,6 @@ #pragma once -#define ENCODERS_PAD_A { C6 } -#define ENCODERS_PAD_B { B6 } -#define ENCODER_RESOLUTION 2 - #define RGB_DI_PIN B5 #ifdef RGB_DI_PIN diff --git a/keyboards/tominabox1/bigboy/info.json b/keyboards/tominabox1/bigboy/info.json index cdddc688d1df..9797c96f4674 100644 --- a/keyboards/tominabox1/bigboy/info.json +++ b/keyboards/tominabox1/bigboy/info.json @@ -8,6 +8,11 @@ "pid": "0x6262", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "B6", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "matrix_pins": { diff --git a/keyboards/tominabox1/le_chiffre/he/config.h b/keyboards/tominabox1/le_chiffre/he/config.h index 3066ba475cdb..f6193c358149 100644 --- a/keyboards/tominabox1/le_chiffre/he/config.h +++ b/keyboards/tominabox1/le_chiffre/he/config.h @@ -23,10 +23,6 @@ #define MATRIX_ROW_PINS { B3, D4, F1, C6 } #define MATRIX_COL_PINS { F4, F5, B0, B2, B1, B4, D7, C7, D2, F7 } -/* Define encoder pads */ -#define ENCODERS_PAD_A { D5 } -#define ENCODERS_PAD_B { D3 } - /* * WS2812 Underglow Matrix options */ diff --git a/keyboards/tominabox1/le_chiffre/he/info.json b/keyboards/tominabox1/le_chiffre/he/info.json index 14c0e6d7cb3f..8f667298f84b 100644 --- a/keyboards/tominabox1/le_chiffre/he/info.json +++ b/keyboards/tominabox1/le_chiffre/he/info.json @@ -2,6 +2,11 @@ "usb": { "device_version": "0.0.3" }, + "encoder": { + "rotary": [ + {"pin_a": "D5", "pin_b": "D3"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu" } diff --git a/keyboards/tominabox1/le_chiffre/rev1/config.h b/keyboards/tominabox1/le_chiffre/rev1/config.h index 1b402683c789..db5d26d665f0 100644 --- a/keyboards/tominabox1/le_chiffre/rev1/config.h +++ b/keyboards/tominabox1/le_chiffre/rev1/config.h @@ -29,10 +29,6 @@ #define MATRIX_ROW_PINS { B3, D4, F1, C6 } #define MATRIX_COL_PINS { F4, F5, B0, B2, B1, B4, D7, C7, D2, F7 } -/* Define encoder pads */ -#define ENCODERS_PAD_A { D5 } -#define ENCODERS_PAD_B { D3 } - /* * WS2812 Underglow Matrix options */ diff --git a/keyboards/tominabox1/le_chiffre/rev1/info.json b/keyboards/tominabox1/le_chiffre/rev1/info.json index dab37baf0456..ce90b22975d9 100644 --- a/keyboards/tominabox1/le_chiffre/rev1/info.json +++ b/keyboards/tominabox1/le_chiffre/rev1/info.json @@ -2,6 +2,11 @@ "usb": { "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D5", "pin_b": "D3"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu" } diff --git a/keyboards/tominabox1/le_chiffre/rev2/config.h b/keyboards/tominabox1/le_chiffre/rev2/config.h index 98de5f0db115..edde93be3ee1 100644 --- a/keyboards/tominabox1/le_chiffre/rev2/config.h +++ b/keyboards/tominabox1/le_chiffre/rev2/config.h @@ -29,10 +29,6 @@ #define MATRIX_ROW_PINS { B3, F6, F7, C7 } #define MATRIX_COL_PINS { B2, F0, F1, F4, F5, B5, B4, D7, D6, D4 } -/* Define encoder pads */ -#define ENCODERS_PAD_A { B6 } -#define ENCODERS_PAD_B { C6 } - /* * WS2812 Underglow Matrix options */ diff --git a/keyboards/tominabox1/le_chiffre/rev2/info.json b/keyboards/tominabox1/le_chiffre/rev2/info.json index 65be217368d2..3c20e5162e71 100644 --- a/keyboards/tominabox1/le_chiffre/rev2/info.json +++ b/keyboards/tominabox1/le_chiffre/rev2/info.json @@ -2,6 +2,11 @@ "usb": { "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "C6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu" } diff --git a/keyboards/torn/config.h b/keyboards/torn/config.h index 67d716127953..0b56ef812d12 100644 --- a/keyboards/torn/config.h +++ b/keyboards/torn/config.h @@ -45,11 +45,6 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A \ - { B2 } -#define ENCODERS_PAD_B \ - { B1 } - #define USB_MAX_POWER_CONSUMPTION 100 #define OLED_TIMEOUT 60000 diff --git a/keyboards/torn/info.json b/keyboards/torn/info.json index 4f878b2620df..44b2f9a5dd5c 100644 --- a/keyboards/torn/info.json +++ b/keyboards/torn/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B1"} + ] + }, "processor": "atmega328p", "bootloader": "usbasploader", "layouts": { diff --git a/keyboards/tunks/ergo33/config.h b/keyboards/tunks/ergo33/config.h index 5d51ecd9f44a..04db2f166567 100644 --- a/keyboards/tunks/ergo33/config.h +++ b/keyboards/tunks/ergo33/config.h @@ -48,9 +48,6 @@ # define RGBLED_NUM 14 #endif -#define ENCODERS_PAD_A { D5 } -#define ENCODERS_PAD_B { D3 } - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/tunks/ergo33/info.json b/keyboards/tunks/ergo33/info.json index 2a11247d923b..1495d5137a29 100644 --- a/keyboards/tunks/ergo33/info.json +++ b/keyboards/tunks/ergo33/info.json @@ -7,6 +7,11 @@ "pid": "0xA0A1", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D5", "pin_b": "D3"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/tzarc/djinn/config.h b/keyboards/tzarc/djinn/config.h index 9ef23769f1e4..f42990d3ad98 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 08634983c864..16b51e4c76ad 100644 --- a/keyboards/tzarc/djinn/info.json +++ b/keyboards/tzarc/djinn/info.json @@ -34,7 +34,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": { From 65af98dec5eaa5002c5b14a1316348d058292dfa Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:36:10 +1100 Subject: [PATCH 24/31] Move encoder config to info.json, U --- keyboards/ungodly/launch_pad/config.h | 7 ------- keyboards/ungodly/launch_pad/info.json | 5 +++++ keyboards/ungodly/nines/config.h | 6 ------ keyboards/ungodly/nines/info.json | 6 ++++++ keyboards/unison/v04/config.h | 6 ------ keyboards/unison/v04/info.json | 9 +++++++++ 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/keyboards/ungodly/launch_pad/config.h b/keyboards/ungodly/launch_pad/config.h index 2d7aa5fa0a9e..dc63dc77bdfc 100644 --- a/keyboards/ungodly/launch_pad/config.h +++ b/keyboards/ungodly/launch_pad/config.h @@ -25,13 +25,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Rotary Encoder Assignment */ -#define ENCODERS_PAD_A \ - { C6 } -#define ENCODERS_PAD_B \ - { B6 } -#define ENCODER_RESOLUTION 2 - /* Midi Slider */ #define SLIDER_PIN F6 #define MIDI_ADVANCED diff --git a/keyboards/ungodly/launch_pad/info.json b/keyboards/ungodly/launch_pad/info.json index 0adbbc45b151..a6e12f3374d5 100644 --- a/keyboards/ungodly/launch_pad/info.json +++ b/keyboards/ungodly/launch_pad/info.json @@ -8,6 +8,11 @@ "pid": "0x4C50", "device_version": "99.9.9" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "B6", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/ungodly/nines/config.h b/keyboards/ungodly/nines/config.h index 85880e4e637a..ce4d927f09f6 100644 --- a/keyboards/ungodly/nines/config.h +++ b/keyboards/ungodly/nines/config.h @@ -15,12 +15,6 @@ */ #pragma once -/* Rotary Encoder Assignments */ -#define ENCODERS_PAD_A { C6, E6 } -#define ENCODERS_PAD_B { D7, B4 } - -#define ENCODER_RESOLUTION 2 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/ungodly/nines/info.json b/keyboards/ungodly/nines/info.json index 34b10245a873..23ffafcad177 100644 --- a/keyboards/ungodly/nines/info.json +++ b/keyboards/ungodly/nines/info.json @@ -8,6 +8,12 @@ "pid": "0x544E", "device_version": "99.9.9" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "D7", "resolution": 2}, + {"pin_a": "E6", "pin_b": "B4", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/unison/v04/config.h b/keyboards/unison/v04/config.h index 5adf813c3f70..6e3ba625e28a 100644 --- a/keyboards/unison/v04/config.h +++ b/keyboards/unison/v04/config.h @@ -25,12 +25,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW -/* Rotary Encoder */ -#ifdef ENCODER_ENABLE - #define ENCODERS_PAD_A { B0, D2, D5, D6, B4 } - #define ENCODERS_PAD_B { B1, D3, D4, D7, B5 } -#endif - /* Audio */ #ifdef AUDIO_ENABLE #define AUDIO_PIN C6 diff --git a/keyboards/unison/v04/info.json b/keyboards/unison/v04/info.json index cc0c77609bf6..a772d344d251 100644 --- a/keyboards/unison/v04/info.json +++ b/keyboards/unison/v04/info.json @@ -8,6 +8,15 @@ "pid": "0x176A", "device_version": "0.4.0" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1"}, + {"pin_a": "D2", "pin_b": "D3"}, + {"pin_a": "D5", "pin_b": "D4"}, + {"pin_a": "D6", "pin_b": "D7"}, + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "bootmagic": { "matrix": [5, 0] }, From d82137e51e6c2a539d7c522361d7869bfc3ab83c Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:36:18 +1100 Subject: [PATCH 25/31] Move encoder config to info.json, V --- keyboards/viendi8l/config.h | 4 ---- keyboards/viendi8l/info.json | 5 +++++ keyboards/viktus/smolka/config.h | 5 ----- keyboards/viktus/smolka/info.json | 6 ++++++ keyboards/viktus/sp_mini/config.h | 9 --------- keyboards/viktus/sp_mini/info.json | 5 +++++ 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/keyboards/viendi8l/config.h b/keyboards/viendi8l/config.h index 840413612ef3..3036f0ac8fab 100644 --- a/keyboards/viendi8l/config.h +++ b/keyboards/viendi8l/config.h @@ -29,10 +29,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS_PAD_A { B10 } -#define ENCODERS_PAD_B { B12 } -#define ENCODER_RESOLUTION 2 - #define TAPPING_TERM 200 #define I2C_DRIVER I2CD1 diff --git a/keyboards/viendi8l/info.json b/keyboards/viendi8l/info.json index 9b8591ee228d..312f97e7f1b3 100644 --- a/keyboards/viendi8l/info.json +++ b/keyboards/viendi8l/info.json @@ -8,6 +8,11 @@ "pid": "0x0877", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B10", "pin_b": "B12", "resolution": 2} + ] + }, "processor": "STM32F401", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/viktus/smolka/config.h b/keyboards/viktus/smolka/config.h index c8a560b40fb8..a4789be9b7a5 100644 --- a/keyboards/viktus/smolka/config.h +++ b/keyboards/viktus/smolka/config.h @@ -39,11 +39,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS_PAD_A { D2, D5 } -#define ENCODERS_PAD_B { D1, D3 } - -#define ENCODER_RESOLUTIONS { 4, 2 } - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/viktus/smolka/info.json b/keyboards/viktus/smolka/info.json index cc6f72f76c2c..3e38c540e6bc 100644 --- a/keyboards/viktus/smolka/info.json +++ b/keyboards/viktus/smolka/info.json @@ -8,6 +8,12 @@ "pid": "0x0010", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D2", "pin_b": "D1"}, + {"pin_a": "D5", "pin_b": "D3", "resolution": 2} + ] + }, "bootmagic": { "matrix": [1, 0] }, diff --git a/keyboards/viktus/sp_mini/config.h b/keyboards/viktus/sp_mini/config.h index 12d56ce32d8f..8b7c6fdc7d7f 100644 --- a/keyboards/viktus/sp_mini/config.h +++ b/keyboards/viktus/sp_mini/config.h @@ -50,15 +50,6 @@ along with this program. If not, see . #define RGBLED_NUM 24 // Number of LEDs #define RGBLED_SPLIT { 12, 12 } - - -#define ENCODERS_PAD_A {F4} -#define ENCODERS_PAD_B {F1} -//#define ENCODERS_PAD_A_RIGHT {F4} -//#define ENCODERS_PAD_B_RIGHT {F1} - -#define ENCODER_RESOLUTIONS { 8 } - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/viktus/sp_mini/info.json b/keyboards/viktus/sp_mini/info.json index b84a224bce61..33cc1f6dcb3b 100644 --- a/keyboards/viktus/sp_mini/info.json +++ b/keyboards/viktus/sp_mini/info.json @@ -8,6 +8,11 @@ "pid": "0x534D", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F1", "resolution": 8} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { From 48f82705a61f8a5a4b9b586afc258449574d9816 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:36:26 +1100 Subject: [PATCH 26/31] Move encoder config to info.json, W --- keyboards/walletburner/cajal/config.h | 3 --- keyboards/walletburner/cajal/info.json | 5 +++++ keyboards/waterfowl/config.h | 5 ----- keyboards/waterfowl/info.json | 6 ++++++ keyboards/wekey/we27/config.h | 14 ++------------ keyboards/wekey/we27/info.json | 5 +++++ keyboards/winry/winry315/config.h | 9 --------- keyboards/winry/winry315/info.json | 7 +++++++ keyboards/work_louder/loop/config.h | 3 --- keyboards/work_louder/loop/info.json | 7 +++++++ keyboards/work_louder/micro/config.h | 5 ----- keyboards/work_louder/micro/info.json | 6 ++++++ keyboards/work_louder/nano/config.h | 5 ----- keyboards/work_louder/nano/info.json | 5 +++++ keyboards/work_louder/work_board/config.h | 5 ----- keyboards/work_louder/work_board/info.json | 5 +++++ keyboards/wren/config.h | 10 ---------- keyboards/wren/info.json | 14 ++++++++++++++ keyboards/wuque/mammoth20x/config.h | 9 --------- keyboards/wuque/mammoth20x/info.json | 5 +++++ keyboards/wuque/mammoth75x/config.h | 9 --------- keyboards/wuque/mammoth75x/info.json | 5 +++++ keyboards/wuque/serneity65/config.h | 4 ---- keyboards/wuque/serneity65/info.json | 5 +++++ 24 files changed, 77 insertions(+), 79 deletions(-) diff --git a/keyboards/walletburner/cajal/config.h b/keyboards/walletburner/cajal/config.h index 94165e1f7b0f..61e2d421aebb 100644 --- a/keyboards/walletburner/cajal/config.h +++ b/keyboards/walletburner/cajal/config.h @@ -21,9 +21,6 @@ #define MATRIX_ROW_PINS { D4, D5, C7, C6 } #define MATRIX_COL_PINS { F4, F1, F0, E6, B0, B1, B2, B3, D0, D1, D2, D3, B4, F6 } -#define ENCODERS_PAD_A { D6 } -#define ENCODERS_PAD_B { D7 } - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/walletburner/cajal/info.json b/keyboards/walletburner/cajal/info.json index 423ce13f6a9c..7aa0563d4c52 100644 --- a/keyboards/walletburner/cajal/info.json +++ b/keyboards/walletburner/cajal/info.json @@ -8,6 +8,11 @@ "pid": "0x6361", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D6", "pin_b": "D7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/waterfowl/config.h b/keyboards/waterfowl/config.h index 752f11ca3d29..62f5ba6633c7 100644 --- a/keyboards/waterfowl/config.h +++ b/keyboards/waterfowl/config.h @@ -28,10 +28,5 @@ #define SPLIT_WPM_ENABLE #define SPLIT_USB_DETECT -// Encoders -#define ENCODERS_PAD_A { B4, B3 } -#define ENCODERS_PAD_B { B5, B2 } -#define ENCODER_RESOLUTIONS { 4, 2 } - // Tapping term #define TAPPING_TERM 200 \ No newline at end of file diff --git a/keyboards/waterfowl/info.json b/keyboards/waterfowl/info.json index fab5a603d3d6..17f01e24e2df 100644 --- a/keyboards/waterfowl/info.json +++ b/keyboards/waterfowl/info.json @@ -8,6 +8,12 @@ "pid": "0x9CE3", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"}, + {"pin_a": "B3", "pin_b": "B2", "resolution": 2}, + ] + }, "split": { "soft_serial_pin": "D2" }, diff --git a/keyboards/wekey/we27/config.h b/keyboards/wekey/we27/config.h index 605400150ec1..2d203cd6b982 100644 --- a/keyboards/wekey/we27/config.h +++ b/keyboards/wekey/we27/config.h @@ -99,19 +99,9 @@ along with this program. If not, see . #endif -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A { D3 } -# define ENCODERS_PAD_B \ - { D2 } -# define ENCODER_RESOLUTION 2 - -# define ENCODERS 1 -# define ENCODERS_CW_KEY \ - { \ - { 4, 5 } \ - } +#define ENCODERS 1 +#define ENCODERS_CW_KEY { { 4, 5 } } #define ENCODERS_CCW_KEY { { 4, 3 } } -#endif /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/wekey/we27/info.json b/keyboards/wekey/we27/info.json index e47fb3518590..0a114ad5487d 100644 --- a/keyboards/wekey/we27/info.json +++ b/keyboards/wekey/we27/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "community_layouts": ["numpad_6x5"], diff --git a/keyboards/winry/winry315/config.h b/keyboards/winry/winry315/config.h index 23efd398166a..fe57adb75f50 100644 --- a/keyboards/winry/winry315/config.h +++ b/keyboards/winry/winry315/config.h @@ -3,15 +3,6 @@ #pragma once -// Encoder pins. -// Encoder numbering (assuming the default board orientation with encoders on -// the top side): -// 0 - left -// 1 - center (with a longer shaft and a larger knob) -// 2 - right -#define ENCODERS_PAD_A { F1, B0, B3 } -#define ENCODERS_PAD_B { F0, B1, B7 } - // Encoder mappings (used for VIA). #define ENCODERS 3 #define ENCODERS_CW_KEY { { 22, 0 }, { 18, 0 }, { 20, 0 } } diff --git a/keyboards/winry/winry315/info.json b/keyboards/winry/winry315/info.json index 1b550c312253..4039d5aaf585 100644 --- a/keyboards/winry/winry315/info.json +++ b/keyboards/winry/winry315/info.json @@ -8,6 +8,13 @@ "pid": "0x0315", "vid": "0xF1F1" }, + "encoder": { + "rotary": [ + {"pin_a": "F1", "pin_b": "F0"}, + {"pin_a": "B0", "pin_b": "B1"}, + {"pin_a": "B3", "pin_b": "B7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "matrix_pins": { diff --git a/keyboards/work_louder/loop/config.h b/keyboards/work_louder/loop/config.h index 6b00a7f6c7ed..1e17946cef67 100644 --- a/keyboards/work_louder/loop/config.h +++ b/keyboards/work_louder/loop/config.h @@ -130,6 +130,3 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -#define ENCODERS_PAD_A { D0, D2, D5 } -#define ENCODERS_PAD_B { D1, D3, D4 } diff --git a/keyboards/work_louder/loop/info.json b/keyboards/work_louder/loop/info.json index 25641426d1bf..df4a5c1be045 100644 --- a/keyboards/work_louder/loop/info.json +++ b/keyboards/work_louder/loop/info.json @@ -7,6 +7,13 @@ "vid": "0x574C", "pid": "0x1DF9" }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"}, + {"pin_a": "D2", "pin_b": "D3"}, + {"pin_a": "D5", "pin_b": "D4"} + ] + }, "bootmagic": { "matrix": [0, 11] }, diff --git a/keyboards/work_louder/micro/config.h b/keyboards/work_louder/micro/config.h index a874f21761ea..bfe04592ac15 100644 --- a/keyboards/work_louder/micro/config.h +++ b/keyboards/work_louder/micro/config.h @@ -80,11 +80,6 @@ //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -#define ENCODERS_PAD_A \ - { D4, B0 } -#define ENCODERS_PAD_B \ - { D6, B1 } - #define WORK_LOUDER_LED_PIN_1 B6 #define WORK_LOUDER_LED_PIN_2 B7 #define WORK_LOUDER_LED_PIN_3 B5 diff --git a/keyboards/work_louder/micro/info.json b/keyboards/work_louder/micro/info.json index b3bfcd6a133c..3627122102f0 100644 --- a/keyboards/work_louder/micro/info.json +++ b/keyboards/work_louder/micro/info.json @@ -45,6 +45,12 @@ "pid": "0xE6E3", "vid": "0x574C" }, + "encoder": { + "rotary": [ + {"pin_a": "D4", "pin_b": "D6"}, + {"pin_a": "B0", "pin_b": "B1"} + ] + }, "build": { "lto": true }, diff --git a/keyboards/work_louder/nano/config.h b/keyboards/work_louder/nano/config.h index 770da02bfee1..9148cf1abf84 100644 --- a/keyboards/work_louder/nano/config.h +++ b/keyboards/work_louder/nano/config.h @@ -130,8 +130,3 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -#define ENCODERS_PAD_A \ - { D7 } -#define ENCODERS_PAD_B \ - { B4 } diff --git a/keyboards/work_louder/nano/info.json b/keyboards/work_louder/nano/info.json index 1f33088a7c98..3eb050b92adb 100644 --- a/keyboards/work_louder/nano/info.json +++ b/keyboards/work_louder/nano/info.json @@ -8,6 +8,11 @@ "pid": "0xE6F0", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D7", "pin_b": "B4"} + ] + }, "bootmagic": { "matrix": [0, 2] }, diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h index 47bb15d1beb1..d9da63eb5083 100644 --- a/keyboards/work_louder/work_board/config.h +++ b/keyboards/work_louder/work_board/config.h @@ -134,9 +134,4 @@ along with this program. If not, see . //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -#define ENCODERS_PAD_A \ - { B0 } -#define ENCODERS_PAD_B \ - { B1 } - #define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x1 diff --git a/keyboards/work_louder/work_board/info.json b/keyboards/work_louder/work_board/info.json index e354390d83a7..5e934e90e0d0 100644 --- a/keyboards/work_louder/work_board/info.json +++ b/keyboards/work_louder/work_board/info.json @@ -7,6 +7,11 @@ "vid": "0x574C", "pid": "0xDCD1" }, + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/wren/config.h b/keyboards/wren/config.h index 41864db4ebca..72e110cc6baf 100644 --- a/keyboards/wren/config.h +++ b/keyboards/wren/config.h @@ -31,16 +31,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D3, D2, C6, D4, B5 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4, D7, F0 } -// define encoders -#define ENCODERS_PAD_A \ - { E6 } -#define ENCODERS_PAD_B \ - { B4 } -#define ENCODERS_PAD_A_RIGHT \ - { B4 } -#define ENCODERS_PAD_B_RIGHT \ - { E6 } - /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wren/info.json b/keyboards/wren/info.json index 72e96144f154..184ddea75b75 100644 --- a/keyboards/wren/info.json +++ b/keyboards/wren/info.json @@ -7,6 +7,20 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "E6", "pin_b": "B4"} + ] + }, + "split": { + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B4", "pin_b": "E6"} + ] + } + } + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/wuque/mammoth20x/config.h b/keyboards/wuque/mammoth20x/config.h index 3ae0303bebbd..25f4c3801c94 100644 --- a/keyboards/wuque/mammoth20x/config.h +++ b/keyboards/wuque/mammoth20x/config.h @@ -29,17 +29,8 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* Enable encoder */ -#define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } - #define ENCODERS 1 -#ifdef ENCODER_RESOLUTION - #undef ENCODER_RESOLUTION -#endif -#define ENCODER_RESOLUTION 2 - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 3, 2 } } #define ENCODERS_CCW_KEY { { 3, 4 } } diff --git a/keyboards/wuque/mammoth20x/info.json b/keyboards/wuque/mammoth20x/info.json index a87798679f2c..b251951becbd 100644 --- a/keyboards/wuque/mammoth20x/info.json +++ b/keyboards/wuque/mammoth20x/info.json @@ -8,6 +8,11 @@ "pid": "0x0005", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D3", "pin_b": "D2", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layout_aliases": { diff --git a/keyboards/wuque/mammoth75x/config.h b/keyboards/wuque/mammoth75x/config.h index 94b05d1eb20b..3910bedfa894 100644 --- a/keyboards/wuque/mammoth75x/config.h +++ b/keyboards/wuque/mammoth75x/config.h @@ -29,17 +29,8 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* Enable encoder */ -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B1 } - #define ENCODERS 1 -#ifdef ENCODER_RESOLUTION - #undef ENCODER_RESOLUTION -#endif -#define ENCODER_RESOLUTION 2 - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 3, 5 } } #define ENCODERS_CCW_KEY { { 5, 5 } } diff --git a/keyboards/wuque/mammoth75x/info.json b/keyboards/wuque/mammoth75x/info.json index 4bb3a29dd717..b668948f46c0 100644 --- a/keyboards/wuque/mammoth75x/info.json +++ b/keyboards/wuque/mammoth75x/info.json @@ -8,6 +8,11 @@ "pid": "0x0004", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B1", "resolution": 2} + ] + }, "indicators": { "caps_lock": "B6", "on_state": 0 diff --git a/keyboards/wuque/serneity65/config.h b/keyboards/wuque/serneity65/config.h index 1d03da2c2766..45f43b0b95ba 100644 --- a/keyboards/wuque/serneity65/config.h +++ b/keyboards/wuque/serneity65/config.h @@ -22,10 +22,6 @@ #define DIODE_DIRECTION COL2ROW -/* Enable encoder */ -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B3 } - #define ENCODERS 1 // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 3, 4 } } diff --git a/keyboards/wuque/serneity65/info.json b/keyboards/wuque/serneity65/info.json index d564e1223680..744b112f70a8 100644 --- a/keyboards/wuque/serneity65/info.json +++ b/keyboards/wuque/serneity65/info.json @@ -8,6 +8,11 @@ "pid": "0x0003", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3"} + ] + }, "indicators": { "caps_lock": "C6", "on_state": 0 From 21ead27a8f4c05f061e88ce6a712ed287df5fb0f Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:36:34 +1100 Subject: [PATCH 27/31] Move encoder config to info.json, X --- keyboards/xenon/config.h | 3 --- keyboards/xenon/info.json | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/keyboards/xenon/config.h b/keyboards/xenon/config.h index 4f44a9e9b073..61fda0e20a76 100644 --- a/keyboards/xenon/config.h +++ b/keyboards/xenon/config.h @@ -22,9 +22,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } -#define ENCODERS_PAD_A { B6 } -#define ENCODERS_PAD_B { B5 } - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xenon/info.json b/keyboards/xenon/info.json index f0fd2f7bf84b..5f74a9bbadd4 100644 --- a/keyboards/xenon/info.json +++ b/keyboards/xenon/info.json @@ -8,6 +8,11 @@ "pid": "0x3404", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B5"} + ] + }, "split": { "soft_serial_pin": "D2" }, From 44fe11a7439e4d431acb2febc0d29b0196795b50 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:36:46 +1100 Subject: [PATCH 28/31] Move encoder config to info.json, Y --- keyboards/yandrstudio/nz67v2/config.h | 7 ------- keyboards/yandrstudio/nz67v2/info.json | 5 +++++ keyboards/yanghu/unicorne/config.h | 5 ----- keyboards/yanghu/unicorne/info.json | 6 ++++++ keyboards/yeehaw/config.h | 3 --- keyboards/yeehaw/info.json | 5 +++++ keyboards/yushakobo/navpad/10/config.h | 4 ---- keyboards/yushakobo/navpad/10/info.json | 5 +++++ keyboards/yushakobo/navpad/10_helix_r/config.h | 6 ------ keyboards/yushakobo/navpad/10_helix_r/info.json | 14 +++++++++++++- keyboards/yushakobo/quick17/config.h | 5 ----- keyboards/yushakobo/quick17/info.json | 5 +++++ keyboards/yushakobo/quick7/config.h | 3 --- keyboards/yushakobo/quick7/info.json | 6 ++++++ 14 files changed, 45 insertions(+), 34 deletions(-) diff --git a/keyboards/yandrstudio/nz67v2/config.h b/keyboards/yandrstudio/nz67v2/config.h index 5e36cf0b6b49..a3d9bb74c5b5 100644 --- a/keyboards/yandrstudio/nz67v2/config.h +++ b/keyboards/yandrstudio/nz67v2/config.h @@ -26,13 +26,6 @@ #define TAP_CODE_DELAY 15 -#ifdef ENCODER_ENABLE - -# define ENCODERS_PAD_A { A9 } -# define ENCODERS_PAD_B { A10 } - -#endif - /* RGB Matrix */ #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/yandrstudio/nz67v2/info.json b/keyboards/yandrstudio/nz67v2/info.json index 033b05a3cba8..ed063749761c 100644 --- a/keyboards/yandrstudio/nz67v2/info.json +++ b/keyboards/yandrstudio/nz67v2/info.json @@ -6,6 +6,11 @@ "pid": "0xAA83", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "A9", "pin_b": "A10"} + ] + }, "layouts": { "LAYOUT_all": { "layout": [ diff --git a/keyboards/yanghu/unicorne/config.h b/keyboards/yanghu/unicorne/config.h index 3fc834909e3c..e53141a77258 100644 --- a/keyboards/yanghu/unicorne/config.h +++ b/keyboards/yanghu/unicorne/config.h @@ -25,11 +25,6 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A \ - { B10, B2 } -#define ENCODERS_PAD_B \ - { B12, B0 } - /* I2C - required for custom i2c_init */ #define I2C1_SCL_PIN B6 #define I2C1_SDA_PIN B7 diff --git a/keyboards/yanghu/unicorne/info.json b/keyboards/yanghu/unicorne/info.json index 67bb7f657d66..85b39abe9b13 100644 --- a/keyboards/yanghu/unicorne/info.json +++ b/keyboards/yanghu/unicorne/info.json @@ -8,6 +8,12 @@ "pid": "0x0204", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B10", "pin_b": "B12"}, + {"pin_a": "B2", "pin_b": "B0"} + ] + }, "layout_aliases": { "LAYOUT": "LAYOUT_split_3x6_4" }, diff --git a/keyboards/yeehaw/config.h b/keyboards/yeehaw/config.h index b14cd03b1b2f..4ead2dc6f27f 100644 --- a/keyboards/yeehaw/config.h +++ b/keyboards/yeehaw/config.h @@ -15,9 +15,6 @@ */ #pragma once -#define ENCODERS_PAD_A { D1 } -#define ENCODERS_PAD_B { D0 } - #define RGB_DI_PIN B2 #ifdef RGB_DI_PIN #define RGBLED_NUM 7 diff --git a/keyboards/yeehaw/info.json b/keyboards/yeehaw/info.json index c82f1fd5ff8b..6c0a2b165edb 100644 --- a/keyboards/yeehaw/info.json +++ b/keyboards/yeehaw/info.json @@ -8,6 +8,11 @@ "pid": "0x5458", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/yushakobo/navpad/10/config.h b/keyboards/yushakobo/navpad/10/config.h index 4a03473d7d09..7f1153299c84 100644 --- a/keyboards/yushakobo/navpad/10/config.h +++ b/keyboards/yushakobo/navpad/10/config.h @@ -17,10 +17,6 @@ along with this program. If not, see . #pragma once - -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { B6 } - /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/yushakobo/navpad/10/info.json b/keyboards/yushakobo/navpad/10/info.json index bf006e158d26..a6b946367f4e 100644 --- a/keyboards/yushakobo/navpad/10/info.json +++ b/keyboards/yushakobo/navpad/10/info.json @@ -7,6 +7,11 @@ "vid": "0x3265", "pid": "0x0008" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B6"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/yushakobo/navpad/10_helix_r/config.h b/keyboards/yushakobo/navpad/10_helix_r/config.h index ae32db05bc3b..5b0e667cc9c4 100644 --- a/keyboards/yushakobo/navpad/10_helix_r/config.h +++ b/keyboards/yushakobo/navpad/10_helix_r/config.h @@ -44,12 +44,6 @@ along with this program. If not, see . 34, 35, 36, 37, 38, 39, 40 } #endif -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { B6 } - -#define ENCODERS_PAD_A_RIGHT { B6 } -#define ENCODERS_PAD_B_RIGHT { B5 } - /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/yushakobo/navpad/10_helix_r/info.json b/keyboards/yushakobo/navpad/10_helix_r/info.json index 76dd055e46ca..19b8c31efb44 100644 --- a/keyboards/yushakobo/navpad/10_helix_r/info.json +++ b/keyboards/yushakobo/navpad/10_helix_r/info.json @@ -8,8 +8,20 @@ "pid": "0x0008", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B6"} + ] + }, "split": { - "soft_serial_pin": "D2" + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B6", "pin_b": "B5"} + ] + } + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/yushakobo/quick17/config.h b/keyboards/yushakobo/quick17/config.h index b805030bda1a..3df5c25081bf 100644 --- a/keyboards/yushakobo/quick17/config.h +++ b/keyboards/yushakobo/quick17/config.h @@ -85,11 +85,6 @@ along with this program. If not, see . #endif -#ifdef ENCODER_ENABLE -#define ENCODERS_PAD_A { B4 } -#define ENCODERS_PAD_B { B5 } -#endif - /* disable action features */ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING diff --git a/keyboards/yushakobo/quick17/info.json b/keyboards/yushakobo/quick17/info.json index 1fbc570b6c1b..7d062aef1611 100644 --- a/keyboards/yushakobo/quick17/info.json +++ b/keyboards/yushakobo/quick17/info.json @@ -8,6 +8,11 @@ "pid": "0x0006", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B5"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "layouts": { diff --git a/keyboards/yushakobo/quick7/config.h b/keyboards/yushakobo/quick7/config.h index 5aaf1891c4d5..96656f70c8c6 100644 --- a/keyboards/yushakobo/quick7/config.h +++ b/keyboards/yushakobo/quick7/config.h @@ -17,9 +17,6 @@ along with this program. If not, see . #pragma once -#define ENCODERS_PAD_A { D1, F5 } -#define ENCODERS_PAD_B { D0, F6 } - #ifdef RGBLIGHT_ENABLE # define RGB_DI_PIN D3 # define RGBLED_NUM 13 diff --git a/keyboards/yushakobo/quick7/info.json b/keyboards/yushakobo/quick7/info.json index dfcd0e4f42b8..4413c06defa3 100644 --- a/keyboards/yushakobo/quick7/info.json +++ b/keyboards/yushakobo/quick7/info.json @@ -8,6 +8,12 @@ "pid": "0x0002", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"}, + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { From 348498db95e4b23cfd5f9e198a109e9075e3c5f0 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Feb 2023 00:36:58 +1100 Subject: [PATCH 29/31] Move encoder config to info.json, Z --- keyboards/z12/config.h | 4 ---- keyboards/z12/info.json | 6 ++++++ keyboards/ztboards/after/config.h | 2 -- keyboards/ztboards/after/info.json | 5 +++++ keyboards/zvecr/zv48/config.h | 3 --- keyboards/zvecr/zv48/info.json | 5 +++++ 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/keyboards/z12/config.h b/keyboards/z12/config.h index 6ee032f5c864..fef7fb59bd16 100644 --- a/keyboards/z12/config.h +++ b/keyboards/z12/config.h @@ -16,10 +16,6 @@ along with this program. If not, see . #pragma once - -#define ENCODERS_PAD_A { B5, B6 } -#define ENCODERS_PAD_B { B4, B2 } - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/z12/info.json b/keyboards/z12/info.json index 4f899bf7d68e..8a88206df8b5 100644 --- a/keyboards/z12/info.json +++ b/keyboards/z12/info.json @@ -8,6 +8,12 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B4"}, + {"pin_a": "B6", "pin_b": "B2"} + ] + }, "processor": "atmega32u4", "bootloader": "caterina", "matrix_pins": { diff --git a/keyboards/ztboards/after/config.h b/keyboards/ztboards/after/config.h index 3459ddb63cfc..7c0453e3ae8f 100644 --- a/keyboards/ztboards/after/config.h +++ b/keyboards/ztboards/after/config.h @@ -20,8 +20,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B3, F6, F5, D5, B2 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D7, D6, D4, C7, C6, B6, B5, B4, F7, F0, F4, F1 } -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B0 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ztboards/after/info.json b/keyboards/ztboards/after/info.json index ab0e4472e531..875478ec1096 100644 --- a/keyboards/ztboards/after/info.json +++ b/keyboards/ztboards/after/info.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B0"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/zvecr/zv48/config.h b/keyboards/zvecr/zv48/config.h index 8ae21a3b53f8..97b0393aab6d 100644 --- a/keyboards/zvecr/zv48/config.h +++ b/keyboards/zvecr/zv48/config.h @@ -40,9 +40,6 @@ //#define SELECT_SOFT_SERIAL_SPEED 0 #define SERIAL_USART_SPEED 921600 -#define ENCODERS_PAD_A { B5 } -#define ENCODERS_PAD_B { A2 } - #define RGB_DI_PIN B1 #define RGBLED_NUM 48 #define RGBLED_SPLIT {24, 24} diff --git a/keyboards/zvecr/zv48/info.json b/keyboards/zvecr/zv48/info.json index 84b50063693e..f3519b94f492 100644 --- a/keyboards/zvecr/zv48/info.json +++ b/keyboards/zvecr/zv48/info.json @@ -8,6 +8,11 @@ "pid": "0x0048", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "A2"} + ] + }, "split": { "soft_serial_pin": "B6", "bootmagic": { From 8d43de9fe7b49c8718b380ad0d1d2d9a59c9ddd0 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 25 Feb 2023 22:38:28 +1100 Subject: [PATCH 30/31] Clean up encoder_action hacks --- keyboards/atlantis/ak81_ve/config.h | 1 - keyboards/atlantis/encoder_actions.c | 15 ++--- keyboards/jones/v1/keymaps/via/config.h | 3 - keyboards/jones/v1/keymaps/via/keymap.c | 8 +-- keyboards/kabedon/kabedon98e/config.h | 1 - keyboards/kabedon/kabedon98e/kabedon98e.c | 8 +-- keyboards/keebio/bamfk1/config.h | 1 - keyboards/keebio/encoder_actions.c | 15 ++--- keyboards/meletrix/zoom65/config.h | 2 - keyboards/meletrix/zoom65/zoom65.c | 8 +-- keyboards/meletrix/zoom65_lite/config.h | 2 - .../meletrix/zoom65_lite/keymaps/via/keymap.c | 12 ++-- keyboards/ml/gas75/keymaps/via/keymap.c | 10 ++-- .../mwstudio/alicekk/keymaps/via/keymap.c | 12 ++-- .../mwstudio/mw75r2/keymaps/via/keymap.c | 12 ++-- keyboards/nightly_boards/adellein/config.h | 2 - .../nightly_boards/adellein/encoder_action.c | 14 ++--- keyboards/nightly_boards/n40_o/config.h | 2 - .../nightly_boards/n40_o/encoder_action.c | 14 ++--- keyboards/nightly_boards/n60_s/config.h | 2 - .../nightly_boards/n60_s/encoder_action.c | 14 ++--- keyboards/nightly_boards/octopad/config.h | 2 - .../nightly_boards/octopad/encoder_action.c | 14 ++--- keyboards/nightly_boards/octopadplus/config.h | 5 -- keyboards/protozoa/p01/config.h | 3 - .../krush/krush65/hotswap/config.h | 1 - .../krush/krush65/hotswap/encoder_actions.c | 15 ++--- .../krush/krush65/solder/encoder_actions.c | 58 ------------------- .../krush/krush65/solder/encoder_actions.h | 23 -------- .../krush/krush65/solder/solder.c | 1 - keyboards/stello65/beta/config.h | 1 - keyboards/stello65/beta/encoder_actions.c | 15 ++--- keyboards/synthlabs/solo/config.h | 2 - keyboards/synthlabs/solo/keymaps/via/keymap.c | 15 ++--- .../spreadwriter/keymaps/via/config.h | 3 - .../spreadwriter/keymaps/via/keymap.c | 8 +-- keyboards/wekey/we27/config.h | 1 - keyboards/wekey/we27/encoder_actions.c | 15 ++--- keyboards/winry/winry315/config.h | 1 - .../winry315/keymaps/via/encoder_actions.c | 16 ++--- keyboards/wuque/mammoth20x/config.h | 2 - keyboards/wuque/mammoth20x/mammoth20x.c | 8 +-- keyboards/wuque/mammoth75x/config.h | 2 - keyboards/wuque/mammoth75x/mammoth75x.c | 8 +-- keyboards/wuque/serneity65/config.h | 1 - keyboards/wuque/serneity65/serneity65.c | 8 +-- 46 files changed, 90 insertions(+), 296 deletions(-) delete mode 100644 keyboards/sawnsprojects/krush/krush65/solder/encoder_actions.c delete mode 100644 keyboards/sawnsprojects/krush/krush65/solder/encoder_actions.h diff --git a/keyboards/atlantis/ak81_ve/config.h b/keyboards/atlantis/ak81_ve/config.h index d5bf49a34fed..7379856a4f82 100644 --- a/keyboards/atlantis/ak81_ve/config.h +++ b/keyboards/atlantis/ak81_ve/config.h @@ -21,7 +21,6 @@ #define MATRIX_ROW_PINS { F1, F7, F6, F5, F4, D5 } #define MATRIX_COL_PINS { F0, C7, C6, B6, B5, B4, D7, D6, B2, B7, D3, D2, D1, D0, B3 } -#define ENCODERS 1 #define ENCODERS_CCW_KEY { { 4, 5 } } // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 3, 5 } } // Note: array is { col, row ) diff --git a/keyboards/atlantis/encoder_actions.c b/keyboards/atlantis/encoder_actions.c index b41a248a83f0..5bfba6d99f8e 100644 --- a/keyboards/atlantis/encoder_actions.c +++ b/keyboards/atlantis/encoder_actions.c @@ -18,16 +18,12 @@ #include "encoder_actions.h" #if defined(VIA_ENABLE) && defined(ENCODER_ENABLE) - -# ifdef ENCODERS -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; -# endif +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { -# ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -38,11 +34,9 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -# endif } void encoder_action_register(uint8_t index, bool clockwise) { -# ifdef ENCODERS keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, @@ -50,7 +44,6 @@ void encoder_action_register(uint8_t index, bool clockwise) { }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -# endif } void matrix_scan_kb(void) { diff --git a/keyboards/jones/v1/keymaps/via/config.h b/keyboards/jones/v1/keymaps/via/config.h index 5d24e1f91a38..a66ab809048c 100644 --- a/keyboards/jones/v1/keymaps/via/config.h +++ b/keyboards/jones/v1/keymaps/via/config.h @@ -24,9 +24,6 @@ along with this program. If not, see . // when turn knob clockwise or counterclockwise. // This is handy to assign key codes by VIA. -// Number of endoder -#define ENCODERS 2 - // Mappings of encoder rotation to key position in key matrix. // First encoder, Left side : k85, k86 // Second encoder, Right side : k95, k96 diff --git a/keyboards/jones/v1/keymaps/via/keymap.c b/keyboards/jones/v1/keymaps/via/keymap.c index 651f7d12ee07..31a182733a30 100644 --- a/keyboards/jones/v1/keymaps/via/keymap.c +++ b/keyboards/jones/v1/keymaps/via/keymap.c @@ -168,12 +168,12 @@ bool led_update_user(led_t led_state) { //------------------------------------------------------------------------------ // Rotary Encoder //------------------------------------------------------------------------------ -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], diff --git a/keyboards/kabedon/kabedon98e/config.h b/keyboards/kabedon/kabedon98e/config.h index 5def60fa817d..b2156c4ada95 100644 --- a/keyboards/kabedon/kabedon98e/config.h +++ b/keyboards/kabedon/kabedon98e/config.h @@ -45,7 +45,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS 2 #define ENCODERS_CW_KEY { { 0, 0 },{ 2, 0 } } #define ENCODERS_CCW_KEY { { 6, 0 },{ 8, 0 } } diff --git a/keyboards/kabedon/kabedon98e/kabedon98e.c b/keyboards/kabedon/kabedon98e/kabedon98e.c index 09af36de42e0..7ca156eab916 100644 --- a/keyboards/kabedon/kabedon98e/kabedon98e.c +++ b/keyboards/kabedon/kabedon98e/kabedon98e.c @@ -15,12 +15,12 @@ */ #include "kabedon98e.h" -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], diff --git a/keyboards/keebio/bamfk1/config.h b/keyboards/keebio/bamfk1/config.h index 35b0f51098d6..590cce19c5c8 100644 --- a/keyboards/keebio/bamfk1/config.h +++ b/keyboards/keebio/bamfk1/config.h @@ -8,7 +8,6 @@ # define STARTUP_SONG SONG(STARTUP_SOUND) #endif -#define ENCODERS 2 #define ENCODERS_CW_KEY { { 1, 1 }, { 3, 1 } } #define ENCODERS_CCW_KEY { { 0, 1 }, { 2, 1 } } diff --git a/keyboards/keebio/encoder_actions.c b/keyboards/keebio/encoder_actions.c index c4e49813f44b..ead941469ab7 100644 --- a/keyboards/keebio/encoder_actions.c +++ b/keyboards/keebio/encoder_actions.c @@ -18,16 +18,12 @@ #include "encoder_actions.h" #if defined(ENCODER_ENABLE) - -# ifdef ENCODERS -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; -# endif +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { -# ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -38,11 +34,9 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -# endif } void encoder_action_register(uint8_t index, bool clockwise) { -# ifdef ENCODERS keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, @@ -50,7 +44,6 @@ void encoder_action_register(uint8_t index, bool clockwise) { }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -# endif } void matrix_scan_kb(void) { diff --git a/keyboards/meletrix/zoom65/config.h b/keyboards/meletrix/zoom65/config.h index 45afb19c997f..4c05b1d83bd2 100644 --- a/keyboards/meletrix/zoom65/config.h +++ b/keyboards/meletrix/zoom65/config.h @@ -22,8 +22,6 @@ #define DIODE_DIRECTION COL2ROW -#define ENCODERS 1 - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 5, 4 } } #define ENCODERS_CCW_KEY { { 3, 4 } } diff --git a/keyboards/meletrix/zoom65/zoom65.c b/keyboards/meletrix/zoom65/zoom65.c index f69ed547eff3..ff27a4442fab 100644 --- a/keyboards/meletrix/zoom65/zoom65.c +++ b/keyboards/meletrix/zoom65/zoom65.c @@ -17,13 +17,13 @@ #include "zoom65.h" #ifdef VIA_ENABLE -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { diff --git a/keyboards/meletrix/zoom65_lite/config.h b/keyboards/meletrix/zoom65_lite/config.h index 45afb19c997f..4c05b1d83bd2 100644 --- a/keyboards/meletrix/zoom65_lite/config.h +++ b/keyboards/meletrix/zoom65_lite/config.h @@ -22,8 +22,6 @@ #define DIODE_DIRECTION COL2ROW -#define ENCODERS 1 - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 5, 4 } } #define ENCODERS_CCW_KEY { { 3, 4 } } diff --git a/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c b/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c index de44abe37e90..23729b43496f 100644 --- a/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c +++ b/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c @@ -16,14 +16,13 @@ #include QMK_KEYBOARD_H -#ifdef VIA_ENABLE -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { @@ -56,8 +55,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { encoder_action_register(index, clockwise); return true; -}; -#endif +} const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( diff --git a/keyboards/ml/gas75/keymaps/via/keymap.c b/keyboards/ml/gas75/keymaps/via/keymap.c index b609f9d1429f..b5e3055427bb 100644 --- a/keyboards/ml/gas75/keymaps/via/keymap.c +++ b/keyboards/ml/gas75/keymaps/via/keymap.c @@ -159,14 +159,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef ENCODER_ENABLE - -#define ENCODERS 1 -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = {{3, 5}}; -static keypos_t encoder_ccw[ENCODERS] = {{4, 5}}; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = {{3, 5}}; +static keypos_t encoder_ccw[NUM_ENCODERS] = {{4, 5}}; void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], diff --git a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c index 62068bd43e3c..6c21e053fa91 100644 --- a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c +++ b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c @@ -53,15 +53,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef ENCODER_ENABLE -#define ENCODERS 1 -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = {{6, 4}}; -static keypos_t encoder_ccw[ENCODERS] = {{7, 4}}; - +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = {{6, 4}}; +static keypos_t encoder_ccw[NUM_ENCODERS] = {{7, 4}}; void encoder_action_unregister(void) { -#ifdef ENCODERS - for (uint8_t index = 0; index < ENCODERS; ++index) { + for (uint8_t index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -72,7 +69,6 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -#endif } void encoder_action_register(uint8_t index, bool clockwise) { diff --git a/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c b/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c index e94667954eea..7b7e1877f5cb 100644 --- a/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c +++ b/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c @@ -105,15 +105,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef ENCODER_ENABLE -#define ENCODERS 1 -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = {{3, 5}}; -static keypos_t encoder_ccw[ENCODERS] = {{4, 5}}; - +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = {{3, 5}}; +static keypos_t encoder_ccw[NUM_ENCODERS] = {{4, 5}}; void encoder_action_unregister(void) { -#ifdef ENCODERS - for (uint8_t index = 0; index < ENCODERS; ++index) { + for (uint8_t index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -124,7 +121,6 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -#endif } void encoder_action_register(uint8_t index, bool clockwise) { diff --git a/keyboards/nightly_boards/adellein/config.h b/keyboards/nightly_boards/adellein/config.h index 639d7ed31451..e4e99106a383 100644 --- a/keyboards/nightly_boards/adellein/config.h +++ b/keyboards/nightly_boards/adellein/config.h @@ -51,8 +51,6 @@ along with this program. If not, see . #endif /* Encoders */ - -#define ENCODERS 1 #define ENCODERS_CW_KEY { { 3, 3 } } #define ENCODERS_CCW_KEY { { 1, 3 } } diff --git a/keyboards/nightly_boards/adellein/encoder_action.c b/keyboards/nightly_boards/adellein/encoder_action.c index 042a3871c979..6b553d3969ee 100644 --- a/keyboards/nightly_boards/adellein/encoder_action.c +++ b/keyboards/nightly_boards/adellein/encoder_action.c @@ -16,15 +16,12 @@ #include "encoder_action.h" -#ifdef ENCODERS -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; -#endif +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { -#ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -35,11 +32,9 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -#endif } void encoder_action_register(uint8_t index, bool clockwise) { -#ifdef ENCODERS keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, @@ -47,5 +42,4 @@ void encoder_action_register(uint8_t index, bool clockwise) { }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -#endif } diff --git a/keyboards/nightly_boards/n40_o/config.h b/keyboards/nightly_boards/n40_o/config.h index 3c976819e002..055aea6055ab 100644 --- a/keyboards/nightly_boards/n40_o/config.h +++ b/keyboards/nightly_boards/n40_o/config.h @@ -51,8 +51,6 @@ along with this program. If not, see . #endif /* Encoders */ - -#define ENCODERS 3 #define ENCODERS_CW_KEY { { 2, 4 },{ 4, 4 },{ 6, 4 } } #define ENCODERS_CCW_KEY { { 1, 4 },{ 3, 4 },{ 5, 4 } } diff --git a/keyboards/nightly_boards/n40_o/encoder_action.c b/keyboards/nightly_boards/n40_o/encoder_action.c index 042a3871c979..6b553d3969ee 100644 --- a/keyboards/nightly_boards/n40_o/encoder_action.c +++ b/keyboards/nightly_boards/n40_o/encoder_action.c @@ -16,15 +16,12 @@ #include "encoder_action.h" -#ifdef ENCODERS -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; -#endif +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { -#ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -35,11 +32,9 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -#endif } void encoder_action_register(uint8_t index, bool clockwise) { -#ifdef ENCODERS keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, @@ -47,5 +42,4 @@ void encoder_action_register(uint8_t index, bool clockwise) { }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -#endif } diff --git a/keyboards/nightly_boards/n60_s/config.h b/keyboards/nightly_boards/n60_s/config.h index e1feda71e467..7ec0b48079d9 100644 --- a/keyboards/nightly_boards/n60_s/config.h +++ b/keyboards/nightly_boards/n60_s/config.h @@ -35,8 +35,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Encoders */ - -#define ENCODERS 1 #define ENCODERS_CW_KEY { { 1, 5 } } #define ENCODERS_CCW_KEY { { 0, 5 } } diff --git a/keyboards/nightly_boards/n60_s/encoder_action.c b/keyboards/nightly_boards/n60_s/encoder_action.c index 042a3871c979..6b553d3969ee 100644 --- a/keyboards/nightly_boards/n60_s/encoder_action.c +++ b/keyboards/nightly_boards/n60_s/encoder_action.c @@ -16,15 +16,12 @@ #include "encoder_action.h" -#ifdef ENCODERS -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; -#endif +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { -#ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -35,11 +32,9 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -#endif } void encoder_action_register(uint8_t index, bool clockwise) { -#ifdef ENCODERS keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, @@ -47,5 +42,4 @@ void encoder_action_register(uint8_t index, bool clockwise) { }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -#endif } diff --git a/keyboards/nightly_boards/octopad/config.h b/keyboards/nightly_boards/octopad/config.h index 47ea794c045c..44868adff68e 100644 --- a/keyboards/nightly_boards/octopad/config.h +++ b/keyboards/nightly_boards/octopad/config.h @@ -51,8 +51,6 @@ along with this program. If not, see . #endif /* Encoders */ - -#define ENCODERS 2 #define ENCODERS_CW_KEY { { 3, 2 },{ 1, 2 } } #define ENCODERS_CCW_KEY { { 2, 2 },{ 0, 2 } } diff --git a/keyboards/nightly_boards/octopad/encoder_action.c b/keyboards/nightly_boards/octopad/encoder_action.c index 042a3871c979..6b553d3969ee 100644 --- a/keyboards/nightly_boards/octopad/encoder_action.c +++ b/keyboards/nightly_boards/octopad/encoder_action.c @@ -16,15 +16,12 @@ #include "encoder_action.h" -#ifdef ENCODERS -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; -#endif +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { -#ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -35,11 +32,9 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -#endif } void encoder_action_register(uint8_t index, bool clockwise) { -#ifdef ENCODERS keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, @@ -47,5 +42,4 @@ void encoder_action_register(uint8_t index, bool clockwise) { }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -#endif } diff --git a/keyboards/nightly_boards/octopadplus/config.h b/keyboards/nightly_boards/octopadplus/config.h index 324e6e4a70e7..5936e812c828 100644 --- a/keyboards/nightly_boards/octopadplus/config.h +++ b/keyboards/nightly_boards/octopadplus/config.h @@ -34,11 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - -/* Encoders */ - -#define ENCODERS 2 - #define TAP_CODE_DELAY 10 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/protozoa/p01/config.h b/keyboards/protozoa/p01/config.h index c2a0d7aae3c3..e3f3faca9cc5 100644 --- a/keyboards/protozoa/p01/config.h +++ b/keyboards/protozoa/p01/config.h @@ -21,9 +21,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B1, B2, B10, B11, B12, B13 } #define MATRIX_COL_PINS { A14, A15, B3, B4, B5, B6, B7, B8, B9, A0, A1, A2, A3, A4, A5, A6, A7, B0 } -/* Encoder */ -#define ENCODERS 1 - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/config.h b/keyboards/sawnsprojects/krush/krush65/hotswap/config.h index 5318ea315e7c..8a947093dc95 100644 --- a/keyboards/sawnsprojects/krush/krush65/hotswap/config.h +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/config.h @@ -25,7 +25,6 @@ /* Encoders */ -#define ENCODERS 1 #define ENCODERS_CW_KEY { { 12, 3 } } #define ENCODERS_CCW_KEY { { 12, 4 } } diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c b/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c index 039f8739b4d1..8a91dde19a4e 100644 --- a/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c @@ -20,16 +20,12 @@ #include "encoder_actions.h" #ifdef ENCODER_ENABLE - -# ifdef ENCODERS -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; -# endif +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { -# ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -40,11 +36,9 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -# endif } void encoder_action_register(uint8_t index, bool clockwise) { -# ifdef ENCODERS keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, @@ -52,7 +46,6 @@ void encoder_action_register(uint8_t index, bool clockwise) { }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -# endif } #endif \ No newline at end of file diff --git a/keyboards/sawnsprojects/krush/krush65/solder/encoder_actions.c b/keyboards/sawnsprojects/krush/krush65/solder/encoder_actions.c deleted file mode 100644 index 039f8739b4d1..000000000000 --- a/keyboards/sawnsprojects/krush/krush65/solder/encoder_actions.c +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright 2020 Neil Brian Ramirez - * Copyright 2021 drashna jael're (@drashna) - * Copyright 2021 uybv - * Copyright 2021 SawnsProjects - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "encoder_actions.h" - -#ifdef ENCODER_ENABLE - -# ifdef ENCODERS -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; -# endif - -void encoder_action_unregister(void) { -# ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { - if (encoder_state[index]) { - keyevent_t encoder_event = (keyevent_t) { - .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], - .pressed = false, - .time = (timer_read() | 1) - }; - encoder_state[index] = 0; - action_exec(encoder_event); - } - } -# endif -} - -void encoder_action_register(uint8_t index, bool clockwise) { -# ifdef ENCODERS - keyevent_t encoder_event = (keyevent_t) { - .key = clockwise ? encoder_cw[index] : encoder_ccw[index], - .pressed = true, - .time = (timer_read() | 1) - }; - encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); - action_exec(encoder_event); -# endif -} - -#endif \ No newline at end of file diff --git a/keyboards/sawnsprojects/krush/krush65/solder/encoder_actions.h b/keyboards/sawnsprojects/krush/krush65/solder/encoder_actions.h deleted file mode 100644 index fb226326324d..000000000000 --- a/keyboards/sawnsprojects/krush/krush65/solder/encoder_actions.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2020 Neil Brian Ramirez - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include "quantum.h" - -void encoder_action_unregister(void); - -void encoder_action_register(uint8_t index, bool clockwise); \ No newline at end of file diff --git a/keyboards/sawnsprojects/krush/krush65/solder/solder.c b/keyboards/sawnsprojects/krush/krush65/solder/solder.c index b8a7729725ca..501d70d1bd68 100644 --- a/keyboards/sawnsprojects/krush/krush65/solder/solder.c +++ b/keyboards/sawnsprojects/krush/krush65/solder/solder.c @@ -15,7 +15,6 @@ */ #include "solder.h" -#include "encoder_actions.h" /* Custom encoder control - handles CW/CCW turning of encoder * Default behavior: diff --git a/keyboards/stello65/beta/config.h b/keyboards/stello65/beta/config.h index 1d1d76dda4db..4efc0635a179 100644 --- a/keyboards/stello65/beta/config.h +++ b/keyboards/stello65/beta/config.h @@ -20,7 +20,6 @@ /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define ENCODERS 1 #define ENCODERS_CW_KEY { { 4, 7 } } #define ENCODERS_CCW_KEY { { 4, 6 } } diff --git a/keyboards/stello65/beta/encoder_actions.c b/keyboards/stello65/beta/encoder_actions.c index 0f32ac2723ad..72970a2ffc31 100644 --- a/keyboards/stello65/beta/encoder_actions.c +++ b/keyboards/stello65/beta/encoder_actions.c @@ -19,16 +19,12 @@ #include "encoder_actions.h" #ifdef ENCODER_ENABLE - -# ifdef ENCODERS -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; -# endif +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { -# ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -39,11 +35,9 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -# endif } void encoder_action_register(uint8_t index, bool clockwise) { -# ifdef ENCODERS keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, @@ -51,7 +45,6 @@ void encoder_action_register(uint8_t index, bool clockwise) { }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -# endif } #endif diff --git a/keyboards/synthlabs/solo/config.h b/keyboards/synthlabs/solo/config.h index 725776986c11..3411aa9f688d 100644 --- a/keyboards/synthlabs/solo/config.h +++ b/keyboards/synthlabs/solo/config.h @@ -3,8 +3,6 @@ #pragma once - -#define ENCODERS 1 #define ENCODERS_CW_KEY { { 2, 1 } } #define ENCODERS_CCW_KEY { { 0, 1 } } diff --git a/keyboards/synthlabs/solo/keymaps/via/keymap.c b/keyboards/synthlabs/solo/keymaps/via/keymap.c index 7949c61375f9..c6634c42d428 100644 --- a/keyboards/synthlabs/solo/keymaps/via/keymap.c +++ b/keyboards/synthlabs/solo/keymaps/via/keymap.c @@ -27,16 +27,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #if defined(VIA_ENABLE) && defined(ENCODER_ENABLE) - -#ifdef ENCODERS -static uint8_t encoder_state[] = {0}; -static keypos_t encoder_cw[] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[] = ENCODERS_CCW_KEY; -#endif +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { -#ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -47,11 +43,9 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -#endif } void encoder_action_register(uint8_t index, bool clockwise) { -#ifdef ENCODERS keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, @@ -59,7 +53,6 @@ void encoder_action_register(uint8_t index, bool clockwise) { }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -#endif } void matrix_scan_user(void) { diff --git a/keyboards/takashicompany/spreadwriter/keymaps/via/config.h b/keyboards/takashicompany/spreadwriter/keymaps/via/config.h index adbbc6ce838e..9587fd7b6b88 100644 --- a/keyboards/takashicompany/spreadwriter/keymaps/via/config.h +++ b/keyboards/takashicompany/spreadwriter/keymaps/via/config.h @@ -12,9 +12,6 @@ // when turn knob clockwise or counterclockwise. // This is handy to assign key codes by VIA. -// Number of endoder -#define ENCODERS 1 - // Mappings of encoder rotation to key position in key matrix. #define ENCODERS_CW_KEY { { 0, 4 }} #define ENCODERS_CCW_KEY { { 6, 0 }} \ No newline at end of file diff --git a/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c b/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c index 7d9a5cebf926..e04c1fea0d33 100644 --- a/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c +++ b/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c @@ -88,12 +88,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //------------------------------------------------------------------------------ // Rotary Encoder //------------------------------------------------------------------------------ -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], diff --git a/keyboards/wekey/we27/config.h b/keyboards/wekey/we27/config.h index 2d203cd6b982..c720fc2103d1 100644 --- a/keyboards/wekey/we27/config.h +++ b/keyboards/wekey/we27/config.h @@ -99,7 +99,6 @@ along with this program. If not, see . #endif -#define ENCODERS 1 #define ENCODERS_CW_KEY { { 4, 5 } } #define ENCODERS_CCW_KEY { { 4, 3 } } diff --git a/keyboards/wekey/we27/encoder_actions.c b/keyboards/wekey/we27/encoder_actions.c index 0f32ac2723ad..72970a2ffc31 100644 --- a/keyboards/wekey/we27/encoder_actions.c +++ b/keyboards/wekey/we27/encoder_actions.c @@ -19,16 +19,12 @@ #include "encoder_actions.h" #ifdef ENCODER_ENABLE - -# ifdef ENCODERS -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; -# endif +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { -# ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -39,11 +35,9 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -# endif } void encoder_action_register(uint8_t index, bool clockwise) { -# ifdef ENCODERS keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, @@ -51,7 +45,6 @@ void encoder_action_register(uint8_t index, bool clockwise) { }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -# endif } #endif diff --git a/keyboards/winry/winry315/config.h b/keyboards/winry/winry315/config.h index fe57adb75f50..620a7f6e6bae 100644 --- a/keyboards/winry/winry315/config.h +++ b/keyboards/winry/winry315/config.h @@ -4,7 +4,6 @@ #pragma once // Encoder mappings (used for VIA). -#define ENCODERS 3 #define ENCODERS_CW_KEY { { 22, 0 }, { 18, 0 }, { 20, 0 } } #define ENCODERS_CCW_KEY { { 23, 0 }, { 19, 0 }, { 21, 0 } } diff --git a/keyboards/winry/winry315/keymaps/via/encoder_actions.c b/keyboards/winry/winry315/keymaps/via/encoder_actions.c index 96dfe74bcaf6..9a9092effd37 100644 --- a/keyboards/winry/winry315/keymaps/via/encoder_actions.c +++ b/keyboards/winry/winry315/keymaps/via/encoder_actions.c @@ -27,11 +27,10 @@ # define ENCODER_STATE_CW 0x01 # define ENCODER_STATE_CCW 0x02 -# ifdef ENCODERS -static uint8_t encoder_state[ENCODERS] = {0}; -static uint16_t encoder_timer[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static uint16_t encoder_timer[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; static void exec_encoder_action(uint8_t index, bool clockwise, bool pressed) { // clang-format off @@ -43,22 +42,18 @@ static void exec_encoder_action(uint8_t index, bool clockwise, bool pressed) { // clang-format on action_exec(encoder_event); } -# endif void encoder_action_unregister(void) { -# ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index] && (timer_elapsed(encoder_timer[index]) >= ENCODER_TAP_DURATION_MS)) { bool clockwise = !!(encoder_state[index] & ENCODER_STATE_CW); encoder_state[index] = 0; exec_encoder_action(index, clockwise, false); } } -# endif } void encoder_action_register(uint8_t index, bool clockwise) { -# ifdef ENCODERS if (encoder_state[index]) { bool was_clockwise = !!(encoder_state[index] & ENCODER_STATE_CW); encoder_state[index] = 0; @@ -67,7 +62,6 @@ void encoder_action_register(uint8_t index, bool clockwise) { encoder_state[index] = clockwise ? ENCODER_STATE_CW : ENCODER_STATE_CCW; encoder_timer[index] = timer_read(); exec_encoder_action(index, clockwise, true); -# endif } void matrix_scan_kb(void) { diff --git a/keyboards/wuque/mammoth20x/config.h b/keyboards/wuque/mammoth20x/config.h index 25f4c3801c94..8d9a74f5aad6 100644 --- a/keyboards/wuque/mammoth20x/config.h +++ b/keyboards/wuque/mammoth20x/config.h @@ -29,8 +29,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS 1 - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 3, 2 } } #define ENCODERS_CCW_KEY { { 3, 4 } } diff --git a/keyboards/wuque/mammoth20x/mammoth20x.c b/keyboards/wuque/mammoth20x/mammoth20x.c index da6ccecd3be5..6cc1dee21ab0 100644 --- a/keyboards/wuque/mammoth20x/mammoth20x.c +++ b/keyboards/wuque/mammoth20x/mammoth20x.c @@ -17,13 +17,13 @@ #include "mammoth20x.h" -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { diff --git a/keyboards/wuque/mammoth75x/config.h b/keyboards/wuque/mammoth75x/config.h index 3910bedfa894..55702e33527b 100644 --- a/keyboards/wuque/mammoth75x/config.h +++ b/keyboards/wuque/mammoth75x/config.h @@ -29,8 +29,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define ENCODERS 1 - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 3, 5 } } #define ENCODERS_CCW_KEY { { 5, 5 } } diff --git a/keyboards/wuque/mammoth75x/mammoth75x.c b/keyboards/wuque/mammoth75x/mammoth75x.c index 6f14657f8899..c2bf2bbe3778 100644 --- a/keyboards/wuque/mammoth75x/mammoth75x.c +++ b/keyboards/wuque/mammoth75x/mammoth75x.c @@ -17,13 +17,13 @@ #include "mammoth75x.h" #ifdef VIA_ENABLE -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { diff --git a/keyboards/wuque/serneity65/config.h b/keyboards/wuque/serneity65/config.h index 45f43b0b95ba..036181772b11 100644 --- a/keyboards/wuque/serneity65/config.h +++ b/keyboards/wuque/serneity65/config.h @@ -22,7 +22,6 @@ #define DIODE_DIRECTION COL2ROW -#define ENCODERS 1 // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 3, 4 } } #define ENCODERS_CCW_KEY { { 5, 4 } } diff --git a/keyboards/wuque/serneity65/serneity65.c b/keyboards/wuque/serneity65/serneity65.c index 6a7c64157f87..1222722b4b2e 100644 --- a/keyboards/wuque/serneity65/serneity65.c +++ b/keyboards/wuque/serneity65/serneity65.c @@ -17,13 +17,13 @@ #include "serneity65.h" #ifdef VIA_ENABLE -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { From 97c1f6177d54cf7309dfbb03d41797f05b083cfe Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 26 Feb 2023 09:09:03 +1100 Subject: [PATCH 31/31] Fix compiles. --- keyboards/keebio/kbo5000/rev1/info.json | 2 +- keyboards/pica40/rev2/info.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/keebio/kbo5000/rev1/info.json b/keyboards/keebio/kbo5000/rev1/info.json index 94d6756e054e..d65c9b38e2b4 100644 --- a/keyboards/keebio/kbo5000/rev1/info.json +++ b/keyboards/keebio/kbo5000/rev1/info.json @@ -11,7 +11,7 @@ "encoder": { "rotary": [ {"pin_a": "F5", "pin_b": "F6"}, - {"pin_a": null, "pin_b": null} + {"pin_a": "NO_PIN", "pin_b": "NO_PIN"} ] }, "backlight": { diff --git a/keyboards/pica40/rev2/info.json b/keyboards/pica40/rev2/info.json index 99540900b944..dbef8254ef96 100644 --- a/keyboards/pica40/rev2/info.json +++ b/keyboards/pica40/rev2/info.json @@ -40,7 +40,7 @@ } }, "encoder": { - "rotary": [{ "pin_a": "GP7", "pin_b": "GP7" }] + "rotary": [{ "pin_a": "GP7", "pin_b": "GP7", "resolution": 4 }] }, "usb": { "device_version": "1.0.0",