From 7e0299117b389b1c7fcdfa2f20891ba2287ea771 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 26 Feb 2023 09:45:12 +1100 Subject: [PATCH] Move encoder config to data driven (#19923) Co-authored-by: Nick Brassel --- 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 | 5 -- 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 | 4 -- 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 | 3 - keyboards/7c8/framework/info.json | 5 ++ keyboards/abacus/config.h | 4 -- keyboards/abacus/info.json | 5 ++ keyboards/abstract/ellipse/rev1/config.h | 4 -- keyboards/abstract/ellipse/rev1/info.json | 13 ++++- 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 | 6 -- keyboards/adpenrose/akemipad/info.json | 5 ++ keyboards/adpenrose/kintsugi/config.h | 6 -- keyboards/adpenrose/kintsugi/info.json | 5 ++ keyboards/adpenrose/obi/config.h | 6 -- 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 | 5 -- 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 | 5 -- keyboards/atlantis/ak81_ve/info.json | 5 ++ keyboards/atlantis/encoder_actions.c | 15 ++--- keyboards/atreyu/rev1/config.h | 7 --- keyboards/atreyu/rev1/info.json | 14 +++++ keyboards/atreyu/rev2/config.h | 5 -- 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 ++ 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 ++ 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 ++ .../checkerboards/phoenix45_ortho/config.h | 5 -- .../checkerboards/phoenix45_ortho/info.json | 5 ++ keyboards/checkerboards/quark/config.h | 5 -- keyboards/checkerboards/quark/info.json | 5 ++ keyboards/checkerboards/quark_plus/config.h | 4 -- keyboards/checkerboards/quark_plus/info.json | 8 +++ .../checkerboards/quark_squared/config.h | 4 -- .../checkerboards/quark_squared/info.json | 5 ++ keyboards/checkerboards/snop60/config.h | 3 - keyboards/checkerboards/snop60/info.json | 5 ++ keyboards/cherrybstudio/cb65/config.h | 5 -- keyboards/chocofly/v1/config.h | 4 -- keyboards/chocofly/v1/info.json | 5 ++ keyboards/chromatonemini/info.json | 2 +- keyboards/ck60i/config.h | 3 - keyboards/ck60i/info.json | 5 ++ keyboards/ckeys/thedora/config.h | 5 -- 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 | 8 --- keyboards/clueboard/2x1800/2019/info.json | 8 +++ keyboards/clueboard/2x1800/2021/config.h | 7 --- 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 ++ 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 | 5 -- 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 | 6 -- 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 ++ keyboards/ealdin/quadrant/config.h | 4 -- keyboards/ealdin/quadrant/info.json | 5 ++ keyboards/ebastler/isometria_75/rev1/config.h | 7 --- .../ebastler/isometria_75/rev1/info.json | 5 ++ keyboards/ein_60/config.h | 6 -- 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 ++ 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 ++ keyboards/giabalanai/config.h | 13 +---- 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 ++ 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/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 | 5 -- 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 ++ .../daskeyboard/daskeyboard4/info.json | 3 +- keyboards/handwired/dc/mc/001/config.h | 10 ---- 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 - .../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 ++ .../handwired/obuwunkunubi/spaget/config.h | 4 -- .../handwired/obuwunkunubi/spaget/info.json | 6 ++ keyboards/handwired/pill60/config.h | 35 +++++------ keyboards/handwired/pill60/info.json | 5 ++ keyboards/handwired/prkl30/feather/config.h | 3 - keyboards/handwired/prkl30/feather/info.json | 7 +++ keyboards/handwired/prkl30/promicro/config.h | 3 - keyboards/handwired/prkl30/promicro/info.json | 7 +++ keyboards/handwired/snatchpad/config.h | 5 -- keyboards/handwired/snatchpad/info.json | 6 ++ .../handwired/swiftrax/bumblebee/config.h | 4 -- .../handwired/swiftrax/bumblebee/info.json | 5 ++ .../handwired/swiftrax/digicarp65/config.h | 3 - .../handwired/swiftrax/digicarp65/info.json | 5 ++ keyboards/handwired/swiftrax/joypad/config.h | 3 - keyboards/handwired/swiftrax/joypad/info.json | 5 ++ .../handwired/swiftrax/pandamic/config.h | 4 -- .../handwired/swiftrax/pandamic/info.json | 5 ++ keyboards/handwired/swiftrax/walter/config.h | 3 - keyboards/handwired/swiftrax/walter/info.json | 5 ++ .../5x6_right/elite_c/config.h | 5 -- .../5x6_right/elite_c/info.json | 5 ++ .../tractyl_manuform/5x6_right/f303/config.h | 6 -- .../tractyl_manuform/5x6_right/f303/info.json | 5 ++ .../tractyl_manuform/5x6_right/f411/config.h | 6 -- .../tractyl_manuform/5x6_right/f411/info.json | 5 ++ .../5x6_right/teensy2pp/config.h | 5 -- .../5x6_right/teensy2pp/info.json | 5 ++ keyboards/handwired/uthol/rev3/config.h | 8 --- keyboards/handwired/uthol/rev3/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 ++ keyboards/io_mini1800/config.h | 3 - keyboards/io_mini1800/info.json | 5 ++ keyboards/jagdpietr/drakon/config.h | 3 - keyboards/jagdpietr/drakon/info.json | 5 ++ keyboards/jkeys_design/gentleman65/config.h | 4 -- keyboards/jkeys_design/gentleman65/info.json | 5 ++ .../jkeys_design/gentleman65_se_s/config.h | 4 -- .../jkeys_design/gentleman65_se_s/info.json | 5 ++ keyboards/jones/v03/config.h | 5 -- keyboards/jones/v03/info.json | 6 ++ keyboards/jones/v03_1/config.h | 5 -- keyboards/jones/v03_1/info.json | 6 ++ keyboards/jones/v1/config.h | 5 -- keyboards/jones/v1/info.json | 6 ++ keyboards/jones/v1/keymaps/via/config.h | 3 - keyboards/jones/v1/keymaps/via/keymap.c | 8 +-- keyboards/kabedon/kabedon98e/config.h | 4 -- keyboards/kabedon/kabedon98e/info.json | 6 ++ keyboards/kabedon/kabedon98e/kabedon98e.c | 8 +-- keyboards/kapcave/arya/config.h | 4 -- keyboards/kapcave/arya/info.json | 7 +++ keyboards/keebio/bamfk1/config.h | 3 - 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/encoder_actions.c | 15 ++--- 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/config.h | 2 - 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 | 3 - keyboards/keychron/q0/rev_0131/info.json | 5 ++ keyboards/keychron/q1/ansi_encoder/config.h | 7 --- 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 | 3 - keyboards/keychron/q10/ansi_encoder/info.json | 5 ++ keyboards/keychron/q10/iso_encoder/config.h | 3 - keyboards/keychron/q10/iso_encoder/info.json | 5 ++ keyboards/keychron/q2/ansi_encoder/config.h | 3 - keyboards/keychron/q2/ansi_encoder/info.json | 5 ++ keyboards/keychron/q2/iso_encoder/config.h | 3 - keyboards/keychron/q2/iso_encoder/info.json | 5 ++ keyboards/keychron/q2/jis_encoder/config.h | 3 - keyboards/keychron/q2/jis_encoder/info.json | 5 ++ keyboards/keychron/q3/ansi_encoder/config.h | 3 - keyboards/keychron/q3/ansi_encoder/info.json | 5 ++ keyboards/keychron/q3/iso_encoder/config.h | 3 - keyboards/keychron/q3/iso_encoder/info.json | 5 ++ keyboards/keychron/q3/jis_encoder/config.h | 3 - keyboards/keychron/q3/jis_encoder/info.json | 5 ++ keyboards/keychron/q5/ansi_encoder/config.h | 3 - keyboards/keychron/q5/ansi_encoder/info.json | 5 ++ keyboards/keychron/q5/iso_encoder/config.h | 3 - keyboards/keychron/q5/iso_encoder/info.json | 5 ++ keyboards/keychron/q6/ansi_encoder/config.h | 3 - keyboards/keychron/q6/ansi_encoder/info.json | 5 ++ keyboards/keychron/q6/iso_encoder/config.h | 3 - keyboards/keychron/q6/iso_encoder/info.json | 5 ++ keyboards/keychron/q65/ansi_encoder/config.h | 3 - keyboards/keychron/q65/ansi_encoder/info.json | 5 ++ keyboards/keychron/q8/ansi_encoder/config.h | 3 - keyboards/keychron/q8/ansi_encoder/info.json | 5 ++ keyboards/keychron/q8/iso_encoder/config.h | 3 - keyboards/keychron/q8/iso_encoder/info.json | 5 ++ keyboards/keychron/q9/ansi_encoder/config.h | 3 - keyboards/keychron/q9/ansi_encoder/info.json | 5 ++ keyboards/keychron/q9/iso_encoder/config.h | 3 - keyboards/keychron/q9/iso_encoder/info.json | 5 ++ keyboards/keychron/v1/ansi_encoder/config.h | 3 - keyboards/keychron/v1/ansi_encoder/info.json | 5 ++ keyboards/keychron/v1/iso_encoder/config.h | 3 - keyboards/keychron/v1/iso_encoder/info.json | 5 ++ keyboards/keychron/v1/jis_encoder/config.h | 3 - keyboards/keychron/v1/jis_encoder/info.json | 5 ++ keyboards/keychron/v10/ansi_encoder/config.h | 3 - keyboards/keychron/v10/ansi_encoder/info.json | 5 ++ keyboards/keychron/v10/iso_encoder/config.h | 3 - keyboards/keychron/v10/iso_encoder/info.json | 5 ++ keyboards/keychron/v2/ansi_encoder/config.h | 3 - keyboards/keychron/v2/ansi_encoder/info.json | 5 ++ keyboards/keychron/v2/iso_encoder/config.h | 3 - keyboards/keychron/v2/iso_encoder/info.json | 5 ++ keyboards/keychron/v2/jis_encoder/config.h | 3 - keyboards/keychron/v2/jis_encoder/info.json | 5 ++ keyboards/keychron/v3/ansi_encoder/config.h | 3 - keyboards/keychron/v3/ansi_encoder/info.json | 5 ++ keyboards/keychron/v3/iso_encoder/config.h | 3 - keyboards/keychron/v3/iso_encoder/info.json | 5 ++ keyboards/keychron/v3/jis_encoder/config.h | 3 - keyboards/keychron/v3/jis_encoder/info.json | 5 ++ keyboards/keychron/v5/ansi_encoder/config.h | 3 - keyboards/keychron/v5/ansi_encoder/info.json | 5 ++ keyboards/keychron/v5/iso_encoder/config.h | 3 - keyboards/keychron/v5/iso_encoder/info.json | 5 ++ keyboards/keychron/v6/ansi_encoder/config.h | 3 - keyboards/keychron/v6/ansi_encoder/info.json | 5 ++ keyboards/keychron/v6/iso_encoder/config.h | 3 - keyboards/keychron/v6/iso_encoder/info.json | 5 ++ keyboards/keychron/v8/ansi_encoder/config.h | 3 - keyboards/keychron/v8/ansi_encoder/info.json | 5 ++ keyboards/keychron/v8/iso_encoder/config.h | 3 - 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 | 6 -- keyboards/keyprez/bison/info.json | 14 ++++- keyboards/keyprez/corgi/config.h | 4 -- keyboards/keyprez/corgi/info.json | 5 ++ keyboards/keyprez/rhino/config.h | 4 -- keyboards/keyprez/rhino/info.json | 5 ++ keyboards/keyprez/unicorn/config.h | 7 --- keyboards/keyprez/unicorn/info.json | 5 ++ keyboards/keysofkings/twokey/config.h | 5 -- keyboards/keysofkings/twokey/info.json | 5 ++ .../keystonecaps/gameroyadvance/config.h | 5 -- .../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 ++ keyboards/latincompass/latinpad/config.h | 5 -- keyboards/latincompass/latinpad/info.json | 6 ++ keyboards/latincompass/latinpadble/config.h | 5 -- keyboards/latincompass/latinpadble/info.json | 5 ++ keyboards/leafcutterlabs/bigknob/config.h | 5 -- 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 ++ .../lizard_trick/tenkey_plusplus/config.h | 5 -- .../lizard_trick/tenkey_plusplus/info.json | 7 +++ keyboards/ll3macorn/bongopad/config.h | 4 -- keyboards/ll3macorn/bongopad/info.json | 5 ++ keyboards/lw67/config.h | 5 -- 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 ++ keyboards/macro1/config.h | 5 -- 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 | 5 -- keyboards/maxr1998/pulse4k/info.json | 6 ++ keyboards/mb44/config.h | 4 -- keyboards/mb44/info.json | 5 ++ keyboards/mechanickeys/undead60m/config.h | 5 -- keyboards/mechanickeys/undead60m/info.json | 5 ++ .../mechlovin/adelais/rgb_led/rev2/config.h | 4 -- .../mechlovin/adelais/rgb_led/rev2/info.json | 5 ++ .../mechlovin/adelais/rgb_led/rev3/config.h | 5 -- .../mechlovin/adelais/rgb_led/rev3/info.json | 5 ++ .../adelais/standard_led/arm/rev3/config.h | 4 -- .../adelais/standard_led/arm/rev3/info.json | 7 +++ .../adelais/standard_led/arm/rev4/config.h | 4 -- .../adelais/standard_led/arm/rev4/info.json | 7 +++ .../adelais/standard_led/avr/rev1/config.h | 4 -- .../adelais/standard_led/avr/rev1/info.json | 7 +++ keyboards/mechlovin/foundation/config.h | 5 -- keyboards/mechlovin/foundation/info.json | 5 ++ keyboards/mechlovin/hex6c/config.h | 4 -- keyboards/mechlovin/hex6c/info.json | 5 ++ .../zed65/no_backlight/retro66/config.h | 7 --- .../zed65/no_backlight/retro66/info.json | 6 ++ keyboards/mechwild/bde/rev2/config.h | 7 --- keyboards/mechwild/bde/rev2/info.json | 5 ++ keyboards/mechwild/clunker/config.h | 4 -- keyboards/mechwild/clunker/info.json | 5 ++ keyboards/mechwild/mercutio/config.h | 6 -- keyboards/mechwild/mercutio/info.json | 5 ++ keyboards/mechwild/mokulua/mirrored/config.h | 6 -- keyboards/mechwild/mokulua/mirrored/info.json | 5 ++ keyboards/mechwild/mokulua/standard/config.h | 6 -- keyboards/mechwild/mokulua/standard/info.json | 5 ++ keyboards/mechwild/murphpad/config.h | 6 -- keyboards/mechwild/murphpad/info.json | 6 ++ keyboards/mechwild/obe/config.h | 6 -- keyboards/mechwild/obe/info.json | 5 ++ keyboards/mechwild/puckbuddy/config.h | 6 -- keyboards/mechwild/puckbuddy/info.json | 6 ++ keyboards/mechwild/waka60/config.h | 6 -- keyboards/mechwild/waka60/info.json | 5 ++ keyboards/meletrix/zoom65/config.h | 8 --- keyboards/meletrix/zoom65/info.json | 5 ++ keyboards/meletrix/zoom65/zoom65.c | 8 +-- keyboards/meletrix/zoom65_lite/config.h | 8 --- keyboards/meletrix/zoom65_lite/info.json | 5 ++ .../meletrix/zoom65_lite/keymaps/via/keymap.c | 12 ++-- keyboards/merge/iso_macro/config.h | 5 -- keyboards/merge/iso_macro/info.json | 6 ++ keyboards/merge/uc1/config.h | 4 -- 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 | 6 -- 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/ml/gas75/keymaps/via/keymap.c | 10 ++-- keyboards/mlego/m48/rev1/config.h | 8 --- 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 | 9 --- keyboards/mlego/m60_split/rev1/info.json | 5 ++ keyboards/mlego/m60_split/rev2/config.h | 11 ---- keyboards/mlego/m60_split/rev2/info.json | 5 ++ keyboards/mlego/m65/rev1/config.h | 7 --- keyboards/mlego/m65/rev1/info.json | 5 ++ keyboards/mlego/m65/rev2/config.h | 7 --- keyboards/mlego/m65/rev2/info.json | 5 ++ keyboards/mlego/m65/rev3/config.h | 8 --- keyboards/mlego/m65/rev3/info.json | 5 ++ keyboards/mlego/m65/rev4/config.h | 8 --- 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 ++ .../mwstudio/alicekk/keymaps/via/keymap.c | 12 ++-- 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 ++ .../mwstudio/mw75r2/keymaps/via/keymap.c | 12 ++-- keyboards/ncc1701kb/config.h | 5 -- keyboards/ncc1701kb/info.json | 19 +++--- keyboards/neito/config.h | 3 - keyboards/neito/info.json | 5 ++ keyboards/neopad/rev1/config.h | 4 -- keyboards/neopad/rev1/info.json | 6 ++ keyboards/nightingale_studios/hailey/config.h | 3 - .../nightingale_studios/hailey/info.json | 5 ++ keyboards/nightly_boards/adellein/config.h | 6 -- .../nightly_boards/adellein/encoder_action.c | 14 ++--- keyboards/nightly_boards/adellein/info.json | 5 ++ keyboards/nightly_boards/n40_o/config.h | 6 -- .../nightly_boards/n40_o/encoder_action.c | 14 ++--- keyboards/nightly_boards/n40_o/info.json | 7 +++ keyboards/nightly_boards/n60_s/config.h | 6 -- .../nightly_boards/n60_s/encoder_action.c | 14 ++--- keyboards/nightly_boards/n60_s/info.json | 5 ++ keyboards/nightly_boards/octopad/config.h | 6 -- .../nightly_boards/octopad/encoder_action.c | 14 ++--- keyboards/nightly_boards/octopad/info.json | 6 ++ keyboards/nightly_boards/octopadplus/config.h | 7 --- .../nightly_boards/octopadplus/info.json | 6 ++ keyboards/nixkeyboards/day_off/config.h | 7 --- keyboards/nixkeyboards/day_off/info.json | 5 ++ .../nopunin10did/kastenwagen1840/config.h | 5 -- .../nopunin10did/kastenwagen1840/info.json | 6 ++ keyboards/nopunin10did/kastenwagen48/config.h | 5 -- .../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 +++ 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 ++ 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/pauperboards/brick/info.json | 2 +- 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/pica40/rev2/info.json | 2 +- keyboards/pica40/rev2/rev2.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 | 5 -- keyboards/protozoa/p01/info.json | 5 ++ keyboards/psuieee/pluto12/config.h | 5 -- 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 ++ keyboards/qpockets/eggman/config.h | 7 --- 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 | 7 --- 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 ++ keyboards/rainkeebs/rainkeeb/config.h | 5 -- 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 | 4 -- 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 | 4 -- keyboards/redox_media/info.json | 5 ++ keyboards/reedskeebs/alish40/info.json | 3 +- 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/config.h | 2 - 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 | 4 -- 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 -- .../krush/krush65/hotswap/config.h | 5 -- .../krush/krush65/hotswap/encoder_actions.c | 15 ++--- .../krush/krush65/hotswap/info.json | 5 ++ .../krush/krush65/solder/config.h | 5 -- .../krush/krush65/solder/encoder_actions.c | 58 ------------------- .../krush/krush65/solder/encoder_actions.h | 23 -------- .../krush/krush65/solder/info.json | 5 ++ .../krush/krush65/solder/solder.c | 1 - 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 --- .../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 ++ .../sneakbox/disarray/staggered/config.h | 6 -- .../sneakbox/disarray/staggered/info.json | 5 ++ keyboards/sofle/keyhive/config.h | 8 --- keyboards/sofle/keyhive/info.json | 14 ++++- keyboards/sofle/rev1/config.h | 7 --- keyboards/sofle/rev1/info.json | 14 ++++- keyboards/spacey/config.h | 5 -- 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 | 7 --- keyboards/stello65/beta/encoder_actions.c | 15 ++--- keyboards/stello65/beta/info.json | 5 ++ keyboards/sthlmkb/lagom/info.json | 4 +- keyboards/sthlmkb/litl/info.json | 2 +- keyboards/swiftrax/retropad/config.h | 3 - keyboards/swiftrax/retropad/info.json | 5 ++ keyboards/synapse/config.h | 8 --- keyboards/synapse/info.json | 6 ++ keyboards/synthlabs/solo/config.h | 5 -- keyboards/synthlabs/solo/info.json | 5 ++ keyboards/synthlabs/solo/keymaps/via/keymap.c | 15 ++--- .../takashicompany/center_enter/config.h | 4 -- .../takashicompany/center_enter/info.json | 5 ++ keyboards/takashicompany/compacx/config.h | 4 -- keyboards/takashicompany/compacx/info.json | 6 ++ keyboards/takashicompany/dogtag/config.h | 4 -- keyboards/takashicompany/dogtag/info.json | 5 ++ keyboards/takashicompany/qoolee/config.h | 4 -- keyboards/takashicompany/qoolee/info.json | 5 ++ .../takashicompany/spreadwriter/config.h | 9 --- .../takashicompany/spreadwriter/info.json | 5 ++ .../spreadwriter/keymaps/via/config.h | 3 - .../spreadwriter/keymaps/via/keymap.c | 8 +-- 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 ++++- 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 | 7 --- keyboards/unison/v04/info.json | 9 +++ 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 ++ 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 | 13 +---- keyboards/wekey/we27/encoder_actions.c | 15 ++--- keyboards/wekey/we27/info.json | 5 ++ keyboards/winry/winry315/config.h | 11 ---- keyboards/winry/winry315/info.json | 7 +++ .../winry315/keymaps/via/encoder_actions.c | 16 ++--- 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 | 11 ---- keyboards/wuque/mammoth20x/info.json | 5 ++ keyboards/wuque/mammoth20x/mammoth20x.c | 8 +-- keyboards/wuque/mammoth75x/config.h | 11 ---- keyboards/wuque/mammoth75x/info.json | 5 ++ keyboards/wuque/mammoth75x/mammoth75x.c | 8 +-- keyboards/wuque/serneity65/config.h | 5 -- keyboards/wuque/serneity65/info.json | 5 ++ keyboards/wuque/serneity65/serneity65.c | 8 +-- keyboards/xenon/config.h | 3 - keyboards/xenon/info.json | 5 ++ 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 ++ .../yushakobo/navpad/10_helix_r/config.h | 6 -- .../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 ++ 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 ++ 972 files changed, 2898 insertions(+), 2569 deletions(-) delete mode 100644 keyboards/arrayperipherals/1x4p1/config.h create mode 100644 keyboards/handwired/prkl30/feather/info.json create mode 100644 keyboards/handwired/prkl30/promicro/info.json delete mode 100644 keyboards/keycapsss/plaid_pad/rev3/config.h delete mode 100644 keyboards/macro3/config.h delete mode 100644 keyboards/sawnsprojects/krush/krush65/solder/encoder_actions.c delete mode 100644 keyboards/sawnsprojects/krush/krush65/solder/encoder_actions.h delete mode 100644 keyboards/takashicompany/spreadwriter/config.h diff --git a/keyboards/0xcb/1337/config.h b/keyboards/0xcb/1337/config.h index b7cbf3b757e..a247d1b3678 100644 --- a/keyboards/0xcb/1337/config.h +++ b/keyboards/0xcb/1337/config.h @@ -19,9 +19,6 @@ 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 } #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN diff --git a/keyboards/0xcb/1337/info.json b/keyboards/0xcb/1337/info.json index 95170ee8732..d34d7166bf8 100644 --- a/keyboards/0xcb/1337/info.json +++ b/keyboards/0xcb/1337/info.json @@ -13,6 +13,11 @@ "levels": 7, "breathing": true }, + "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 0f517163e5e..f77002e8ab7 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 ENCODER_RESOLUTION 4 -#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 b6e5f01b272..a18bd7b3136 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 0fcd15894f7..59435646613 100644 --- a/keyboards/10bleoledhub/config.h +++ b/keyboards/10bleoledhub/config.h @@ -40,8 +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 } - -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/10bleoledhub/info.json b/keyboards/10bleoledhub/info.json index 84dea67c3ad..dd106a74a50 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 6d19ace806c..dfed1e4e6f1 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 0f8bee6efe8..42c0bc7b129 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 f71b6b79429..04f5fdd9793 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 7886ce228e6..13e2c55fa59 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 b84cc698e44..eb8bd97b590 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 acb5cc58550..18023c847ef 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 afce07dbc9b..e0799e65a12 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 RGB_DI_PIN B3 #ifdef RGB_DI_PIN #define RGBLED_NUM 8 diff --git a/keyboards/25keys/aleth42/rev1/info.json b/keyboards/25keys/aleth42/rev1/info.json index 7d3baad862d..9d70daf01ff 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"} + ] + }, "backlight": { "pin": "C6", "levels": 8, diff --git a/keyboards/25keys/cassette42/config.h b/keyboards/25keys/cassette42/config.h index c57f66da5d5..686eea8fc75 100644 --- a/keyboards/25keys/cassette42/config.h +++ b/keyboards/25keys/cassette42/config.h @@ -17,10 +17,6 @@ along with this program. If not, see . #pragma once -#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 # define RGBLED_NUM 5 diff --git a/keyboards/25keys/cassette42/info.json b/keyboards/25keys/cassette42/info.json index 280733feb92..f791a83e481 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 6025ba1d013..67a1b481577 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 a50d646244c..e4ab7f79a95 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 734bc8d737c..fcf2f8ea44f 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 530c2f3031a..0bf42f9a75e 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 3cc7d44f1b3..ba7016ab340 100644 --- a/keyboards/7c8/framework/config.h +++ b/keyboards/7c8/framework/config.h @@ -18,10 +18,7 @@ #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 ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 16 #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/7c8/framework/info.json b/keyboards/7c8/framework/info.json index a9871f77455..ca440e9a76e 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": { diff --git a/keyboards/abacus/config.h b/keyboards/abacus/config.h index 0fff0052572..2e28b792a1d 100644 --- a/keyboards/abacus/config.h +++ b/keyboards/abacus/config.h @@ -33,10 +33,6 @@ along with this program. If not, see . #define DIP_SWITCH_PINS { D0 } -#define ENCODERS_PAD_A { F1 } -#define ENCODERS_PAD_B { F0 } -#define ENCODER_RESOLUTION 4 - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define RGB_DI_PIN D1 diff --git a/keyboards/abacus/info.json b/keyboards/abacus/info.json index 17cd35aba8b..132187db265 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 46e0cacce49..f7932863e9a 100644 --- a/keyboards/abstract/ellipse/rev1/config.h +++ b/keyboards/abstract/ellipse/rev1/config.h @@ -64,7 +64,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 fe1939d2b61..230e286c5da 100644 --- a/keyboards/abstract/ellipse/rev1/info.json +++ b/keyboards/abstract/ellipse/rev1/info.json @@ -1,13 +1,20 @@ { - "keyboard_name": "Ellipse", + "keyboard_name": "Ellipse", "manufacturer": "AbstractKB", - "url": "https://abstractkb.tk/product/ellipse-rev1", - "maintainer": "AbstractKB", + "url": "https://abstractkb.tk/product/ellipse-rev1", + "maintainer": "AbstractKB", "usb": { "vid": "0xFEED", "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} + ] + }, "backlight": { "pin": "C6", "levels": 15 diff --git a/keyboards/acheron/shark/alpha/config.h b/keyboards/acheron/shark/alpha/config.h index dba9b3f41d2..9c36ac3a1f6 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 5b235cc387c..d6b5dfcd0f6 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"} + ] + }, "backlight": { "pin": "B0" }, diff --git a/keyboards/acheron/shark/beta/config.h b/keyboards/acheron/shark/beta/config.h index 161b9b15582..8cfc57b9d58 100644 --- a/keyboards/acheron/shark/beta/config.h +++ b/keyboards/acheron/shark/beta/config.h @@ -49,7 +49,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 0dcb286e978..73025df6c4b 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"} + ] + }, "backlight": { "pin": "A6", "levels": 20, diff --git a/keyboards/adafruit/macropad/config.h b/keyboards/adafruit/macropad/config.h index 6f2c08c5e8e..c493c487e38 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 4986a5974f2..75c859adb12 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 41156ecf3d3..47fcf429ac8 100644 --- a/keyboards/adpenrose/akemipad/config.h +++ b/keyboards/adpenrose/akemipad/config.h @@ -20,12 +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 /* Audio functionality */ diff --git a/keyboards/adpenrose/akemipad/info.json b/keyboards/adpenrose/akemipad/info.json index 2e3f7851643..9b5a8d6ef6a 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 c4007613e98..5ffeb868374 100644 --- a/keyboards/adpenrose/kintsugi/config.h +++ b/keyboards/adpenrose/kintsugi/config.h @@ -34,12 +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 /* Underglow options: */ diff --git a/keyboards/adpenrose/kintsugi/info.json b/keyboards/adpenrose/kintsugi/info.json index 8c6258f020a..a26c65b42a8 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 c577a4a727d..c9f606999e1 100644 --- a/keyboards/adpenrose/obi/config.h +++ b/keyboards/adpenrose/obi/config.h @@ -20,12 +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 /* Underglow options: */ diff --git a/keyboards/adpenrose/obi/info.json b/keyboards/adpenrose/obi/info.json index 544b4fc5d4a..c0c1b73c644 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 e7799e2b0be..a39d7fef7d7 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 c2e1afd84ca..c41557a9204 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 2028f9bda3e..148e9a76720 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 f8d2300fd94..82111176257 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 be3a49fe337..df6d076d5c0 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 94e1f828cc4..19d53a9ce10 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 1e109c70016..f2793935cbc 100644 --- a/keyboards/aplyard/aplx6/rev2/config.h +++ b/keyboards/aplyard/aplx6/rev2/config.h @@ -27,9 +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 ENCODER_RESOLUTION 4 - #define TAP_CODE_DELAY 50 diff --git a/keyboards/aplyard/aplx6/rev2/info.json b/keyboards/aplyard/aplx6/rev2/info.json index 314d52dc8de..114894a7144 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 b70680e4f53..00000000000 --- 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 b124b203349..2cc838bc929 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 4a7898350df..7379856a4f8 100644 --- a/keyboards/atlantis/ak81_ve/config.h +++ b/keyboards/atlantis/ak81_ve/config.h @@ -21,11 +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 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/atlantis/ak81_ve/info.json b/keyboards/atlantis/ak81_ve/info.json index 052492b7ce1..0269bd1e279 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/atlantis/encoder_actions.c b/keyboards/atlantis/encoder_actions.c index b41a248a83f..5bfba6d99f8 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/atreyu/rev1/config.h b/keyboards/atreyu/rev1/config.h index 67a4d1d05da..99eb2c21e60 100644 --- a/keyboards/atreyu/rev1/config.h +++ b/keyboards/atreyu/rev1/config.h @@ -30,13 +30,6 @@ #define MATRIX_ROW_PINS { D7, E6, B4, B5, F6, F7, B1, B3, B6, B2 } #define MATRIX_COL_PINS { C6, D4, D0, D1, D2, D3 } -/* encoder support */ -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } -#define ENCODERS_PAD_A_RIGHT { F4 } -#define ENCODERS_PAD_B_RIGHT { F5 } -#define ENCODER_RESOLUTION 4 - /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreyu/rev1/info.json b/keyboards/atreyu/rev1/info.json index a9522acd5dc..6d191d06356 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 baaef0800c9..de63cf3bd1b 100644 --- a/keyboards/atreyu/rev2/config.h +++ b/keyboards/atreyu/rev2/config.h @@ -30,11 +30,6 @@ #define MATRIX_ROW_PINS { D7, E6, B4, B5, F6, F7, B1, B3, B6, B2 } #define MATRIX_COL_PINS { F4, F5, C6, D4, D2, D3 } -/* encoder support */ -#define ENCODERS_PAD_A { D5, D5 } -#define ENCODERS_PAD_B { B7, C7 } -#define ENCODER_RESOLUTION 4 - /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreyu/rev2/info.json b/keyboards/atreyu/rev2/info.json index 5c74a40c92c..a890b8d2716 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 5aee77c04d6..3978f581e1c 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 d6b770ee489..7105fc17874 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 a0e5af4531f..efe0c279324 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 3a0b43fb712..70ffcc9efc3 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 1009ab6e331..86dff022e06 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 fdb71ce0e89..5b31b5ca111 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" }, diff --git a/keyboards/bandominedoni/config.h b/keyboards/bandominedoni/config.h index 947f60b0f63..7a25216afdd 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 79961fa770d..d0d470a4e47 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 e21dcdd3fe7..c06395545d5 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 6d7cf723a82..8743e3aad1f 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 dca609a1703..2c3f6f97f24 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 ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 diff --git a/keyboards/basketweave/info.json b/keyboards/basketweave/info.json index d976a2811cd..3ef505854e8 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 516f749ff6b..28c21cb9f55 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 5574bf6da4f..4f256e8ac57 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 ece3ed5928f..de47d3a071d 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 320590894be..49dcc857e93 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 587a0a0d5de..1b4ca326d9f 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 58f724fbbef..43e614dbad5 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 444f0de0e7d..9342bd02839 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 3db2ab2e111..72e432c8717 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 6dddf137f72..1c175166eeb 100644 --- a/keyboards/boston/config.h +++ b/keyboards/boston/config.h @@ -49,12 +49,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 40cc21008c7..1d8e39f29df 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} + ] + }, "backlight": { "pin": "A6", "levels": 6, diff --git a/keyboards/boston_meetup/2019/config.h b/keyboards/boston_meetup/2019/config.h index 624d8fd1d05..00e8648df86 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 5ce23750625..22f54c3472e 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", diff --git a/keyboards/cannonkeys/balance/config.h b/keyboards/cannonkeys/balance/config.h index 5ba99322ff4..5d93b09a273 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 13eb96a62fb..b9844e52950 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 021c4f38b65..5246778d130 100644 --- a/keyboards/cannonkeys/ortho75/config.h +++ b/keyboards/cannonkeys/ortho75/config.h @@ -24,9 +24,6 @@ along with this program. If not, see . #define BACKLIGHT_PWM_DRIVER PWMD1 #define BACKLIGHT_PWM_CHANNEL 1 -#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 31465c47c04..751eeb5297d 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"} + ] + }, "backlight": { "pin": "A8", "levels": 6, diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index c2c20e17716..ac9548dd272 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 - // I2C config #define I2C_DRIVER I2CD1 #define I2C1_SCL_PIN B6 diff --git a/keyboards/cannonkeys/satisfaction75/info.json b/keyboards/cannonkeys/satisfaction75/info.json index dd157defba2..9bf8459b1ae 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} + ] + }, "backlight": { "levels": 24, "breathing": true diff --git a/keyboards/capsunlocked/cu7/config.h b/keyboards/capsunlocked/cu7/config.h index 93db7814f25..cdc031b93b0 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 64416b02646..ebd7b6d491d 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 3f1b16129a9..8c11a3ccf74 100644 --- a/keyboards/checkerboards/phoenix45_ortho/config.h +++ b/keyboards/checkerboards/phoenix45_ortho/config.h @@ -29,8 +29,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* encoder pads */ -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B2 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/checkerboards/phoenix45_ortho/info.json b/keyboards/checkerboards/phoenix45_ortho/info.json index ed976903e8d..23f6b024fa0 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 c064c8569a9..42ccb063001 100644 --- a/keyboards/checkerboards/quark/config.h +++ b/keyboards/checkerboards/quark/config.h @@ -46,8 +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 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/checkerboards/quark/info.json b/keyboards/checkerboards/quark/info.json index f7016ac048b..0f7f3b0f440 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 b44a42406b6..69781c0fa2e 100644 --- a/keyboards/checkerboards/quark_plus/config.h +++ b/keyboards/checkerboards/quark_plus/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 ENCODERS_PAD_A { C7, B7, B3, B2} -#define ENCODERS_PAD_B { B7, C7, B2, B3} -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/checkerboards/quark_plus/info.json b/keyboards/checkerboards/quark_plus/info.json index 6c40827e74f..49ab42adcb0 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"} + ] + }, "backlight": { "pin": "C4", "levels": 6, diff --git a/keyboards/checkerboards/quark_squared/config.h b/keyboards/checkerboards/quark_squared/config.h index 1715a1101b7..85bed28b459 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 699300a3a6e..de8496a7981 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 92f1cd72e85..5015355170d 100644 --- a/keyboards/checkerboards/snop60/config.h +++ b/keyboards/checkerboards/snop60/config.h @@ -47,6 +47,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 b3e96454651..0c543a7c85d 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"} + ] + }, "backlight": { "pin": "D1", "levels": 6, diff --git a/keyboards/cherrybstudio/cb65/config.h b/keyboards/cherrybstudio/cb65/config.h index 6bf9dba1e5a..b298fec8dc5 100644 --- a/keyboards/cherrybstudio/cb65/config.h +++ b/keyboards/cherrybstudio/cb65/config.h @@ -28,11 +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 } -//#define ENCODER_RESOLUTION 4 - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/chocofly/v1/config.h b/keyboards/chocofly/v1/config.h index aa7e280ce4f..a1886ffafad 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 f0b5f7b21dc..ab4fde45e6c 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/chromatonemini/info.json b/keyboards/chromatonemini/info.json index 506347a4d58..c4307fe9887 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/ck60i/config.h b/keyboards/ck60i/config.h index b847eb42d7b..908eb0d188b 100644 --- a/keyboards/ck60i/config.h +++ b/keyboards/ck60i/config.h @@ -45,9 +45,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 5ebf94953ed..22e8f265f64 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"} + ] + }, "backlight": { "pin": "A6", "levels": 6, diff --git a/keyboards/ckeys/thedora/config.h b/keyboards/ckeys/thedora/config.h index 787b4dcc19b..5bcb91e8225 100755 --- a/keyboards/ckeys/thedora/config.h +++ b/keyboards/ckeys/thedora/config.h @@ -16,11 +16,6 @@ #pragma once - -#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/ckeys/thedora/info.json b/keyboards/ckeys/thedora/info.json index 66b2e378453..b72287fc2e6 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 0461020f091..b57e29acdef 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 } - /* 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/ckeys/washington/info.json b/keyboards/ckeys/washington/info.json index 59e427a0b0a..b9bb2fce7b2 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"} + ] + }, "backlight": { "pin": "B6", "breathing": true diff --git a/keyboards/clickety_split/leeloo/info.json b/keyboards/clickety_split/leeloo/info.json index fbed9fefa54..cdd9d713a6d 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 70ba6154ddf..b309fa210b1 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 b73b5bb9ff9..031952a0b39 100644 --- a/keyboards/clueboard/2x1800/2019/config.h +++ b/keyboards/clueboard/2x1800/2019/config.h @@ -17,14 +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 } -#define ENCODER_RESOLUTION 4 - /* 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 37a3146ee34..0eebbabb6d6 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 8e514629837..eb4fd4bbf68 100644 --- a/keyboards/clueboard/2x1800/2021/config.h +++ b/keyboards/clueboard/2x1800/2021/config.h @@ -23,13 +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 } -#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/clueboard/2x1800/2021/info.json b/keyboards/clueboard/2x1800/2021/info.json index 10b681f60cc..44842c0e168 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 d33e3e1f788..840d8e7ca58 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 eae6ee7415b..20d5ad2ff40 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 d73f5b18232..633cbec1554 100644 --- a/keyboards/custommk/evo70/config.h +++ b/keyboards/custommk/evo70/config.h @@ -21,9 +21,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 824edd42773..1ea89ad92ad 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": { "pin": "B5", "levels": 17, diff --git a/keyboards/custommk/genesis/rev1/config.h b/keyboards/custommk/genesis/rev1/config.h index 5f6113bc68d..c5e7661c65b 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 3ff1d77904f..aaab705432e 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 f034eab5790..f152f723feb 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 6ba57648cb1..45b83c512ab 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": { diff --git a/keyboards/dailycraft/owl8/config.h b/keyboards/dailycraft/owl8/config.h index 41efbbb6b51..7da6e3f1bf2 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 1aed397e381..ee1d19e7d66 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 41efbbb6b51..7da6e3f1bf2 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 69dc1479a4a..c8d58037188 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 b430a301d7b..3708284700b 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 5558cac96fd..e976a6a1554 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 bf501e83abb..d8a6d95c9b3 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 992960c5a2e..4434ba95d74 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 687bb7a2942..e28d974b78f 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 c7206e9d971..589c8c5089f 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 48326e7f226..4d5aa33be97 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 735a5cf16af..8301a03813e 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 47255ed3aea..1e908ea0291 100644 --- a/keyboards/dmqdesign/spin/config.h +++ b/keyboards/dmqdesign/spin/config.h @@ -26,11 +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 } -#define ENCODER_RESOLUTION 4 - //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 2e5148236e2..ff5101f8ea8 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 5f30b978121..aa066fe3933 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 d8bf6e8b739..d0acdedfb9b 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 29367f26e84..e7e2791ac8d 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 28aa77b127c..8b5eeb45c29 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 42e521c18d1..866bd3e1d92 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 47ed0c3f429..9fe8e831859 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 416219d5c74..740f1baea76 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 9d75ada43eb..227511295cb 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 bce35cc22e5..d4617a87861 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 52915ac2224..f2ee7bb80a3 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 dae2e086522..d4617a87861 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 6483a4b1293..b2de93f477c 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 8ea9dd48d5d..63c16c1c710 100644 --- a/keyboards/draculad/config.h +++ b/keyboards/draculad/config.h @@ -42,12 +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 { 4, 4 } -#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 310fa976593..83b071e98bc 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 f941fa5d058..e701420bee7 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 8b39ae5ba1e..c847a456501 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 6e384d11623..e13ed8af9db 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 20f2edd54f9..49a56a27862 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 d063077004d..5700fad7d23 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 02d1e1e4c3c..b9f92467012 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 fe1f5e44aad..da4fb5b4108 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 1b96eab73f0..3fe1a8b4f83 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 d302a078d5b..2e605318d12 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 160b696fe24..cf6adb38016 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 10e50bbb996..92dd62ea17a 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 a12eecb8dc3..8b6294af5f9 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 5eb5ae961c9..cdc8d665dcf 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 dc01df1c323..437d009dc86 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 421d1f7a1d0..09adca69e5c 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 f7da467561a..8a3d2734151 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 9a7be81260a..dce94fd8d4c 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 f7da467561a..e51452897ac 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 4300694b822..57fac8225fa 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 a20f41682eb..7576fe2aa50 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 9f6a109f847..82f308f6513 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 db02b1aead7..6cef09807bf 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 a989bf9bafb..2c00ba8eef2 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 31f44f74fed..acdbe2c590b 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 4a907fc8ece..87e057133dc 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 7043ccc98d4..f1a4bc3f161 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 bd80723d929..87e057133dc 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 1f54c23d8e6..413e0ac3795 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 d93f882fb08..87e057133dc 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 246473ec3d5..7f3d04417c1 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", diff --git a/keyboards/ealdin/quadrant/config.h b/keyboards/ealdin/quadrant/config.h index e4f37ae1c9a..f4954fcd119 100644 --- a/keyboards/ealdin/quadrant/config.h +++ b/keyboards/ealdin/quadrant/config.h @@ -24,10 +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 ENCODER_RESOLUTION 4 - #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 e62de3f54f0..d8b388c3314 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 4aa733a06a9..979424c64a3 100644 --- a/keyboards/ebastler/isometria_75/rev1/config.h +++ b/keyboards/ebastler/isometria_75/rev1/config.h @@ -43,13 +43,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 a2a8c4e1d54..83061d92df3 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} + ] + }, "backlight": { "pin": "A9", "levels": 5, diff --git a/keyboards/ein_60/config.h b/keyboards/ein_60/config.h index 3297437ae8c..457f0a5013e 100644 --- a/keyboards/ein_60/config.h +++ b/keyboards/ein_60/config.h @@ -23,12 +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 } -# define ENCODER_RESOLUTIONS { 4, 4 } -#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 676915d9e63..3eaa251d780 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 2a7804e1a16..c76fc98986d 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 b3b8a77a027..76b428b1cd5 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 3cd6d65e1a3..52a4bf2ff9b 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 b89255f90ab..42b8abda541 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 ca86bd78bcb..2f1708d532b 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 66bcb280ce8..cda0c495a4b 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 7e3a59e6316..003131ceaeb 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 9a92b02d6ef..7ab1267ed9b 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 6bea2c459c1..ef8948786b3 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 4c52181f679..da501c67567 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 f386c4033ca..31b6d017ce6 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 b61d4c95d5b..bcef81b3106 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 22143042a85..081ab502169 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 3fc238b3b90..0a127429030 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": { diff --git a/keyboards/feker/ik75/config.h b/keyboards/feker/ik75/config.h index faddc42ce8c..d05ae4f3fed 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 0fec2c9d4c0..2107909b3e6 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 81212585a93..6f88b36fe76 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 764daf87882..1cf9fd94ebd 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 831bb7a0e62..3e03a4020ea 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 335f80f65cc..5da5369b7c4 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 ffd05b6e7db..83dcb4fe421 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 3d1619776f8..2cfb64b7934 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" }, diff --git a/keyboards/giabalanai/config.h b/keyboards/giabalanai/config.h index a24f802ff04..01e84b4cdd8 100644 --- a/keyboards/giabalanai/config.h +++ b/keyboards/giabalanai/config.h @@ -220,18 +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 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 +#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 05c0e67fdfd..30bd26159f9 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 ee71cdbca74..276e6f6c6d8 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 50607c3f8f1..eaaf6e69dd9 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 73e8e75bdf9..c633d722a09 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 58636b462b8..b8a7e94a82f 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 dce316167a0..48181ec488a 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 37b2e4b1cc6..a8a25f85470 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 10eaa5474be..c37ccd53df8 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 9fc348cc731..56b84cb4271 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 34ba7b23a0d..fe5b37c6b85 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", diff --git a/keyboards/h0oni/deskpad/config.h b/keyboards/h0oni/deskpad/config.h index a9b932daf4a..ec6c3b733dd 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 30d3e3d32ea..2c553313c8a 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 97ab4c6a439..64d1d41b0fb 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 ec89f322536..2fd5bda8810 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 1185bee5e77..07d53e4e499 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 1282ab2ffe6..aa97f81a733 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 61eeea4e017..0ecdf933b0b 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 50ae0900fbe..191b1055420 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/handwired/amigopunk/config.h b/keyboards/handwired/amigopunk/config.h index 78f8271f840..2cbbb3152a5 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 2f98f2c7557..e79911a6763 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 497a2deb16c..62c3144cc55 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 057931bb4e5..5f7e6733062 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 21f78e0645c..23dbfa831cd 100644 --- a/keyboards/handwired/d48/config.h +++ b/keyboards/handwired/d48/config.h @@ -40,11 +40,6 @@ ) #endif -/* 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" #define OLED_TIMEOUT 0 diff --git a/keyboards/handwired/d48/info.json b/keyboards/handwired/d48/info.json index 9da51d59593..c607f21937f 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 e69ceac3317..a2a5455ab14 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 ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 100 diff --git a/keyboards/handwired/dactylmacropad/info.json b/keyboards/handwired/dactylmacropad/info.json index b56174caa2f..1f56982b6dd 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 6a5d485d7fe..1fefa56fc60 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 a28c8855373..27671cc28a7 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/daskeyboard/daskeyboard4/info.json b/keyboards/handwired/daskeyboard/daskeyboard4/info.json index 067450ae0bb..900a66bb8b9 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 7be4ba0aa9b..4e9dfdea8cc 100644 --- a/keyboards/handwired/dc/mc/001/config.h +++ b/keyboards/handwired/dc/mc/001/config.h @@ -17,16 +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 } -#define ENCODER_RESOLUTION 4 - /* * 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 78c75f37133..852915569ed 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 a9b3c12ef23..e46edef395e 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 2b7a8cfc438..f7253711e4f 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 8045d59c670..577b27b3720 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 3ddf4075495..24fb55f5daf 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 a942bd253d4..2face5fbed7 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 RGB_DI_PIN E2 #define RGB_MATRIX_LED_COUNT 30 // RGB Matrix Animation modes. Explicitly enabled diff --git a/keyboards/handwired/hnah108/info.json b/keyboards/handwired/hnah108/info.json index c9dcc020cc5..116591fddff 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"} + ] + }, "backlight": { "pin": "B7", "levels": 4, diff --git a/keyboards/handwired/mutepad/config.h b/keyboards/handwired/mutepad/config.h index 97ba13cd6a6..9ebec0ffef6 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 408ecffc51e..6068f33b9dc 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 7743cd6cd60..6a7baeba338 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 ed635d02089..8a205c67945 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 d374143192d..e96fba1db88 100644 --- a/keyboards/handwired/pill60/config.h +++ b/keyboards/handwired/pill60/config.h @@ -1,17 +1,17 @@ - /* Copyright 2020 Imam Rafii - * - * 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 . + /* Copyright 2020 Imam Rafii + * + * 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 @@ -20,10 +20,3 @@ #define BACKLIGHT_PWM_DRIVER PWMD5 #define BACKLIGHT_PWM_CHANNEL 1 - -/* 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 891196f87bb..5ab526ce67d 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} + ] + }, "backlight": { "driver": "software", "pin": "B14", diff --git a/keyboards/handwired/prkl30/feather/config.h b/keyboards/handwired/prkl30/feather/config.h index 5e94752e1b5..a1b7295e324 100644 --- a/keyboards/handwired/prkl30/feather/config.h +++ b/keyboards/handwired/prkl30/feather/config.h @@ -20,9 +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 } -#define ENCODER_RESOLUTION 4 /* RGB Light Configuration */ diff --git a/keyboards/handwired/prkl30/feather/info.json b/keyboards/handwired/prkl30/feather/info.json new file mode 100644 index 00000000000..8078ee04814 --- /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 6edad3bc5cd..c3767088c79 100644 --- a/keyboards/handwired/prkl30/promicro/config.h +++ b/keyboards/handwired/prkl30/promicro/config.h @@ -20,9 +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 } -#define ENCODER_RESOLUTION 4 /* RGB Light Configuration */ diff --git a/keyboards/handwired/prkl30/promicro/info.json b/keyboards/handwired/prkl30/promicro/info.json new file mode 100644 index 00000000000..a7ca847765b --- /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 97de836d049..57d303a983f 100644 --- a/keyboards/handwired/snatchpad/config.h +++ b/keyboards/handwired/snatchpad/config.h @@ -20,11 +20,6 @@ /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Rotary encoder options */ -#define ENCODER_RESOLUTIONS { 4, 4 } -#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 da0221f4741..a86091abfdb 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 f18b0fab89c..c10291a82af 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 887fc697af6..2147a556c2d 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 6618b9fa839..80b735d0d8a 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 aba6fbd54d6..2eef1057563 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 45d0d0bb700..2f54bc0c4e5 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 9b3f094e85c..bef5225bcd0 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 b802e4782a8..77daa76c24a 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 b5d0ebd1ba5..60fe2886f5f 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 d58a3cbfb42..7bfee265ab6 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 675da09c9ca..88da47f36b8 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 e4856c4eecb..c52610e9d3d 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 4fcfeed9218..dabab602ddb 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 f3f3fb7e22f..d10cb0bd8bb 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 3ad29d36b8f..bed70941bfa 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 e93e70f569b..227863aaa5b 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 9b81dc18ebb..0791e50ebf8 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 cae5b7fc14d..51ff0d31239 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 a7fb36c71e6..7f60ae0edc5 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 dff88fb7c6d..1e6b532e2af 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 d95bbc9bca2..b5d099b27a0 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" diff --git a/keyboards/helix/rev3_4rows/config.h b/keyboards/helix/rev3_4rows/config.h index 083b95c8ade..97b4ed3f486 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 d37df4d4c50..45945f88719 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 2f6ea61bb6a..a047bd7d878 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 6d7786d213c..9709708d68e 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 e1464871bad..81736ff1759 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 29a23aad809..f18bd158cca 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 5e2ba6018ae..72f1a842c77 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 943982d65e7..aa03a7a4f92 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 e1464871bad..81736ff1759 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 f5cf4486d5a..e803ed52beb 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 6388d793208..8436f5df251 100644 --- a/keyboards/hnahkb/vn66/config.h +++ b/keyboards/hnahkb/vn66/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#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 6a3f12e65ec..b35cabd1a10 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} + ] + }, "backlight": { "pin": "B6", "levels": 4, diff --git a/keyboards/hub16/config.h b/keyboards/hub16/config.h index 83f0ac5b239..8eb865e9b33 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 ec1f3fc2cd5..0da7c129eb6 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 ad95e4f38c2..41a98ac9834 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 a8f678cb243..10ec779fdf4 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": { diff --git a/keyboards/io_mini1800/config.h b/keyboards/io_mini1800/config.h index 32f4e0e49be..95251ca8f87 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 bdc04f17166..05b346d793f 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": { diff --git a/keyboards/jagdpietr/drakon/config.h b/keyboards/jagdpietr/drakon/config.h index dc4f83bc321..163236c90c2 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 d29849d0c64..3aab7891990 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 91259c5f2cf..f8280340e82 100644 --- a/keyboards/jkeys_design/gentleman65/config.h +++ b/keyboards/jkeys_design/gentleman65/config.h @@ -39,8 +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 ENCODER_RESOLUTION 4 - #define RGB_MATRIX_LED_COUNT 14 diff --git a/keyboards/jkeys_design/gentleman65/info.json b/keyboards/jkeys_design/gentleman65/info.json index 51a34f460e4..fff5b9b7529 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 662d0b78c29..c80b64ef10d 100644 --- a/keyboards/jkeys_design/gentleman65_se_s/config.h +++ b/keyboards/jkeys_design/gentleman65_se_s/config.h @@ -39,8 +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 ENCODER_RESOLUTION 4 - #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 b4acdb13929..2415eb5c180 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 f04b9cc78e3..fc1ae1ff774 100644 --- a/keyboards/jones/v03/config.h +++ b/keyboards/jones/v03/config.h @@ -41,11 +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 } -#define ENCODER_RESOLUTION 4 //the default & suggested is 4 - /* Audio */ #ifdef AUDIO_ENABLE #define AUDIO_PIN C6 diff --git a/keyboards/jones/v03/info.json b/keyboards/jones/v03/info.json index 996509d5047..388c0fb9efd 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 b0d12c81558..548b98e6757 100644 --- a/keyboards/jones/v03_1/config.h +++ b/keyboards/jones/v03_1/config.h @@ -41,11 +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 } -#define ENCODER_RESOLUTION 4 //the default & suggested is 4 - /* 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 0bde4d3b5b2..45e7b8022f2 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 aa0ceee74b1..1936d5d2567 100644 --- a/keyboards/jones/v1/config.h +++ b/keyboards/jones/v1/config.h @@ -24,11 +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 } -#define ENCODER_RESOLUTION 4 //the default & suggested is 4 - /* Audio */ #ifdef AUDIO_ENABLE #define AUDIO_PIN C6 diff --git a/keyboards/jones/v1/info.json b/keyboards/jones/v1/info.json index 8e03e57950e..37f0b70087f 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] }, diff --git a/keyboards/jones/v1/keymaps/via/config.h b/keyboards/jones/v1/keymaps/via/config.h index 5d24e1f91a3..a66ab809048 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 651f7d12ee0..31a182733a3 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 7edabd4292d..b2156c4ada9 100644 --- a/keyboards/kabedon/kabedon98e/config.h +++ b/keyboards/kabedon/kabedon98e/config.h @@ -45,10 +45,6 @@ /* Locking resynchronize hack */ #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 1ec2ed9ac5f..def8f726125 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/kabedon/kabedon98e/kabedon98e.c b/keyboards/kabedon/kabedon98e/kabedon98e.c index 09af36de42e..7ca156eab91 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/kapcave/arya/config.h b/keyboards/kapcave/arya/config.h index 5f60e8fec5e..dd197f23385 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 9ded56205af..54a1513f90d 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 de8b594cec1..590cce19c5c 100644 --- a/keyboards/keebio/bamfk1/config.h +++ b/keyboards/keebio/bamfk1/config.h @@ -8,9 +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 c39cbd3ce0a..c647eec5144 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 c9e0a63896c..fbd33490d62 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 RGB_DI_PIN D3 #ifdef RGB_DI_PIN #define RGBLED_NUM 4 diff --git a/keyboards/keebio/bdn9/rev1/info.json b/keyboards/keebio/bdn9/rev1/info.json index ec52e8ef6b5..8e7b01b7949 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"} + ] + }, "backlight": { "pin": "B5", "levels": 7 diff --git a/keyboards/keebio/bdn9/rev2/config.h b/keyboards/keebio/bdn9/rev2/config.h index f30de7e1978..ee2065f176e 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 24eebef1a8f..c23acbc27fa 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 9aa38cbe070..0f69303ca80 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 5421218a6b6..c5ce2f5a175 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"} + ] + }, "backlight": { "pin": "A6", "levels": 7 diff --git a/keyboards/keebio/encoder_actions.c b/keyboards/keebio/encoder_actions.c index c4e49813f44..ead941469ab 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/keebio/foldkb/rev1/config.h b/keyboards/keebio/foldkb/rev1/config.h index 002bf3b9a8a..3b10809fb64 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 } /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keebio/foldkb/rev1/info.json b/keyboards/keebio/foldkb/rev1/info.json index 46617db128c..00dffdc401d 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"} + ] + }, "backlight": { "pin": "B5" }, diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h index 1834b0573dc..932daf43968 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 a90be8a1b6b..0fc9aa4832e 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"} + ] + }, "backlight": { "pin": "B6", "levels": 5 diff --git a/keyboards/keebio/iris/rev4/config.h b/keyboards/keebio/iris/rev4/config.h index afac7c80ee7..d1e542d7748 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 6915619b0f0..a0689c0ed41 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"} + ] + }, "backlight": { "pin": "B5", "levels": 5 @@ -15,7 +20,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 086bddd8ced..24449703424 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 c45d09a8df2..8279cdcc2b6 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"} + ] + }, "backlight": { "pin": "B5", "levels": 5 @@ -15,7 +20,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 a07aee024d1..0c6b1e38f8e 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 930cc7a34da..8470624a310 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 b78a757344c..dd05a6ec3be 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 f03043a0e76..027a79f512f 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 b78a757344c..dd05a6ec3be 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 2fef279eb3a..b8d1f076a41 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 112edec5929..906b65b0b2e 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 b44059ee240..086f8907a95 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 df4180f9c23..4e6f11cd389 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 CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/kbo5000/rev1/info.json b/keyboards/keebio/kbo5000/rev1/info.json index 8d0b9877a11..d65c9b38e2b 100644 --- a/keyboards/keebio/kbo5000/rev1/info.json +++ b/keyboards/keebio/kbo5000/rev1/info.json @@ -8,11 +8,25 @@ "pid": "0x126A", "device_version": "1.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"}, + {"pin_a": "NO_PIN", "pin_b": "NO_PIN"} + ] + }, "backlight": { "pin": "B5" }, "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 3ccae644215..63f1408cda9 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 CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/quefrency/rev2/info.json b/keyboards/keebio/quefrency/rev2/info.json index c5e75b37819..508e2431b9c 100644 --- a/keyboards/keebio/quefrency/rev2/info.json +++ b/keyboards/keebio/quefrency/rev2/info.json @@ -8,11 +8,23 @@ "pid": "0x2257", "device_version": "2.0.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "backlight": { "pin": "B5" }, "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 3ccae644215..63f1408cda9 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 CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/quefrency/rev3/info.json b/keyboards/keebio/quefrency/rev3/info.json index 0fcb867a882..cd335a1d277 100644 --- a/keyboards/keebio/quefrency/rev3/info.json +++ b/keyboards/keebio/quefrency/rev3/info.json @@ -8,11 +8,23 @@ "pid": "0x3357", "device_version": "3.1.0" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F6"} + ] + }, "backlight": { "pin": "B5" }, "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 ed29b07d323..3292fbf3021 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 374335f2b4e..de9a383d4fd 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 ed29b07d323..3292fbf3021 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 c2fdc5c149d..422d9872585 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 807383befc8..c4b27e4324a 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 268e56032da..028332b5f4f 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 0ec73b78743..e30cb586101 100644 --- a/keyboards/keebsforall/coarse60/config.h +++ b/keyboards/keebsforall/coarse60/config.h @@ -47,10 +47,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 63fa7d5fe82..d769b4e7d03 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} + ] + }, "backlight": { "pin": "A6", "levels": 6, diff --git a/keyboards/keebsforall/freebirdnp/pro/config.h b/keyboards/keebsforall/freebirdnp/pro/config.h index 943d87d730f..85bcc17f0e0 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 40723c36996..d4eda0ad0b8 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 240f334ccf7..f2988c8ede0 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 c2d77fca501..f0c0dcd63fa 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 fbcf482c355..592fefe5d47 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 09f5867a4c9..0bfeffe39ac 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/config.h b/keyboards/keycapsss/plaid_pad/config.h index 1bdd1187364..5825367ac1e 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/keycapsss/plaid_pad/rev1/config.h b/keyboards/keycapsss/plaid_pad/rev1/config.h index 5956835a0b2..ef2037c5684 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 3d98c4cb575..b9fe9e977a2 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 efb2609eddf..ef2037c5684 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 0a1da66f73f..637139c5a44 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 7e4786c5bca..00000000000 --- 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 2f5b474c4d8..93b5e3bdc97 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 5a31fc4e770..f94517ebb40 100644 --- a/keyboards/keychron/q0/rev_0131/config.h +++ b/keyboards/keychron/q0/rev_0131/config.h @@ -35,7 +35,4 @@ #define NUM_LOCK_LED_INDEX 5 /* 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/q0/rev_0131/info.json b/keyboards/keychron/q0/rev_0131/info.json index ad555630f91..94808bd9c4d 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 b38261abf6b..a41976d560b 100644 --- a/keyboards/keychron/q1/ansi_encoder/config.h +++ b/keyboards/keychron/q1/ansi_encoder/config.h @@ -24,10 +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 } - -/* Specifies the number of pulses the encoder registers between each detent */ -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/keychron/q1/ansi_encoder/info.json b/keyboards/keychron/q1/ansi_encoder/info.json index 8fdd64ed7a4..2391e674ad0 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 984b3c77d02..b52fb88383c 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 573c43696fa..e4dce374c85 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 d02436c01d8..9012abd4f75 100644 --- a/keyboards/keychron/q10/ansi_encoder/config.h +++ b/keyboards/keychron/q10/ansi_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 70de4d95be6..9814da0c264 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 7f4a5754327..7a5646c56e2 100644 --- a/keyboards/keychron/q10/iso_encoder/config.h +++ b/keyboards/keychron/q10/iso_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 f0b5b2704e2..96311fac066 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 25e444933ce..b7e4b1e7f87 100644 --- a/keyboards/keychron/q2/ansi_encoder/config.h +++ b/keyboards/keychron/q2/ansi_encoder/config.h @@ -22,7 +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_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q2/ansi_encoder/info.json b/keyboards/keychron/q2/ansi_encoder/info.json index f3eddd9ecbd..a2a12dc39ce 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 aa779918af2..376b92b6fa1 100644 --- a/keyboards/keychron/q2/iso_encoder/config.h +++ b/keyboards/keychron/q2/iso_encoder/config.h @@ -22,7 +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_RESOLUTION 4 #define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q2/iso_encoder/info.json b/keyboards/keychron/q2/iso_encoder/info.json index 36184a88077..028522c2598 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 e0ca950bc3e..5e7ab551437 100644 --- a/keyboards/keychron/q2/jis_encoder/config.h +++ b/keyboards/keychron/q2/jis_encoder/config.h @@ -24,9 +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_RESOLUTION 4 #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 a0b5852b15c..18e800703b9 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 505a45b79cf..201288841a6 100644 --- a/keyboards/keychron/q3/ansi_encoder/config.h +++ b/keyboards/keychron/q3/ansi_encoder/config.h @@ -26,9 +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_RESOLUTION 4 #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 491a2831c87..3bd5a9d59a1 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 0cc5fbf1d97..2ee93a4faea 100644 --- a/keyboards/keychron/q3/iso_encoder/config.h +++ b/keyboards/keychron/q3/iso_encoder/config.h @@ -26,9 +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_RESOLUTION 4 #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 06fb0338256..6f1a24b3723 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 322f04cb0fc..9fca0cfc73c 100644 --- a/keyboards/keychron/q3/jis_encoder/config.h +++ b/keyboards/keychron/q3/jis_encoder/config.h @@ -31,9 +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_RESOLUTION 4 #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 7e203cb9c98..ed124727325 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 6aecac619e0..3986c11a027 100644 --- a/keyboards/keychron/q5/ansi_encoder/config.h +++ b/keyboards/keychron/q5/ansi_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 ab5d25320a6..7bd6f179c6a 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 3c9eee8d494..3a786cbb39b 100644 --- a/keyboards/keychron/q5/iso_encoder/config.h +++ b/keyboards/keychron/q5/iso_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 59a4ad32334..81cd72036f4 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 1949be399b0..573fa614a32 100644 --- a/keyboards/keychron/q6/ansi_encoder/config.h +++ b/keyboards/keychron/q6/ansi_encoder/config.h @@ -31,9 +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_RESOLUTION 4 #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 86d2cda5d16..60b983b12e7 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 63fe3a83c14..512a33bafde 100644 --- a/keyboards/keychron/q6/iso_encoder/config.h +++ b/keyboards/keychron/q6/iso_encoder/config.h @@ -31,9 +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_RESOLUTION 4 #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 2996e0022a7..598a715c3f0 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 1d04a4649ea..f57797677e9 100644 --- a/keyboards/keychron/q65/ansi_encoder/config.h +++ b/keyboards/keychron/q65/ansi_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 a7ec2d56b33..b91892a55bc 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 1d825e97701..63d16c21af2 100644 --- a/keyboards/keychron/q8/ansi_encoder/config.h +++ b/keyboards/keychron/q8/ansi_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 3859c19dee7..b75a8781986 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 1325738f8f5..cdda41df5d0 100644 --- a/keyboards/keychron/q8/iso_encoder/config.h +++ b/keyboards/keychron/q8/iso_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 48a32c915cf..45181452bea 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 56f4966388f..6850e5c2d67 100644 --- a/keyboards/keychron/q9/ansi_encoder/config.h +++ b/keyboards/keychron/q9/ansi_encoder/config.h @@ -21,9 +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_RESOLUTION 4 #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 54719d57496..5100c189450 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 0d7e2c5a501..65d7ad77082 100644 --- a/keyboards/keychron/q9/iso_encoder/config.h +++ b/keyboards/keychron/q9/iso_encoder/config.h @@ -21,9 +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_RESOLUTION 4 #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 4e4819519d3..dee0a8953aa 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 c7af3db8fa4..c32e4d104a3 100644 --- a/keyboards/keychron/v1/ansi_encoder/config.h +++ b/keyboards/keychron/v1/ansi_encoder/config.h @@ -25,9 +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_RESOLUTION 4 #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 19322f1fc98..af396f6bb60 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 18273b3b36f..fd231aa98a1 100644 --- a/keyboards/keychron/v1/iso_encoder/config.h +++ b/keyboards/keychron/v1/iso_encoder/config.h @@ -25,9 +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_RESOLUTION 4 #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 9febe465db7..c08e7d4539b 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 5a68e5dd50f..93d2a72d98a 100644 --- a/keyboards/keychron/v1/jis_encoder/config.h +++ b/keyboards/keychron/v1/jis_encoder/config.h @@ -25,9 +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_RESOLUTION 4 #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 abbe941427e..75544984817 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 4f689125412..8b5595e4d6c 100644 --- a/keyboards/keychron/v10/ansi_encoder/config.h +++ b/keyboards/keychron/v10/ansi_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 c3b78316d52..cf8ae78b99e 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 b064f10a604..75706949d61 100644 --- a/keyboards/keychron/v10/iso_encoder/config.h +++ b/keyboards/keychron/v10/iso_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 ed48f6270a4..554e0b907e7 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 51b5cf8c66a..6ee6d1e7c66 100644 --- a/keyboards/keychron/v2/ansi_encoder/config.h +++ b/keyboards/keychron/v2/ansi_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 257bd6b5fc7..1e729eb6368 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 60d3f554fa8..f69d6834538 100644 --- a/keyboards/keychron/v2/iso_encoder/config.h +++ b/keyboards/keychron/v2/iso_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 212129eeb47..a784b33ec57 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 3c4b5ddd011..a9a3438ab75 100644 --- a/keyboards/keychron/v2/jis_encoder/config.h +++ b/keyboards/keychron/v2/jis_encoder/config.h @@ -25,9 +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_RESOLUTION 4 #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 d284dd5a249..abb76636f73 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 6b6d2b9a1cd..6310f181a08 100644 --- a/keyboards/keychron/v3/ansi_encoder/config.h +++ b/keyboards/keychron/v3/ansi_encoder/config.h @@ -28,9 +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_RESOLUTION 4 #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 fb9a1a669e7..5fdf765356d 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 8972acfe02d..7033a2093aa 100644 --- a/keyboards/keychron/v3/iso_encoder/config.h +++ b/keyboards/keychron/v3/iso_encoder/config.h @@ -28,9 +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_RESOLUTION 4 #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 34ff04a9d06..b38ad45930b 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 3c63cd306ee..5f67d6a870d 100644 --- a/keyboards/keychron/v3/jis_encoder/config.h +++ b/keyboards/keychron/v3/jis_encoder/config.h @@ -31,9 +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_RESOLUTION 4 #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 86374520f7c..1f2d2b425b4 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 659a3ea88e6..6ce87e63ab8 100644 --- a/keyboards/keychron/v5/ansi_encoder/config.h +++ b/keyboards/keychron/v5/ansi_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 b9da185e56d..9461379d1ab 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 49711b5d3b3..dab565612eb 100644 --- a/keyboards/keychron/v5/iso_encoder/config.h +++ b/keyboards/keychron/v5/iso_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 edde8d4b21d..21c1891069f 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 c87df6a9bfd..0d8d843d2f3 100644 --- a/keyboards/keychron/v6/ansi_encoder/config.h +++ b/keyboards/keychron/v6/ansi_encoder/config.h @@ -37,9 +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_RESOLUTION 4 #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 1ac88337f32..d6f46506eca 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 567db0d7b57..6e8069f7ece 100644 --- a/keyboards/keychron/v6/iso_encoder/config.h +++ b/keyboards/keychron/v6/iso_encoder/config.h @@ -37,9 +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_RESOLUTION 4 #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 f0e4a3d4f2d..d8f86e5aa0b 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 6d749eed375..57b9bd02707 100644 --- a/keyboards/keychron/v8/ansi_encoder/config.h +++ b/keyboards/keychron/v8/ansi_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 c33b8955e85..f6a9de655b4 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 b460669c245..0bb4fbf8217 100644 --- a/keyboards/keychron/v8/iso_encoder/config.h +++ b/keyboards/keychron/v8/iso_encoder/config.h @@ -22,9 +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_RESOLUTION 4 #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 ad546d0e330..2abaeda111f 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 e8e33187d9f..0c7fe33f6ba 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 7739f4f1715..336707f2392 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 b9e3a702861..e940f5fa057 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 2ea14e8aeb7..66e0ca20e04 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 28e823f11f1..ba68e0d9761 100644 --- a/keyboards/keyprez/bison/config.h +++ b/keyboards/keyprez/bison/config.h @@ -34,12 +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 } -#define ENCODER_RESOLUTION 4 - /* 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 5c33dc5fa67..a18beb8305c 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 ac78581c42e..081e14372db 100644 --- a/keyboards/keyprez/corgi/config.h +++ b/keyboards/keyprez/corgi/config.h @@ -28,10 +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 } -#define ENCODER_RESOLUTION 4 - /* 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 daaacae394e..f130ae59193 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 1b972e7b602..3ea5c1384d6 100644 --- a/keyboards/keyprez/rhino/config.h +++ b/keyboards/keyprez/rhino/config.h @@ -34,10 +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 ENCODER_RESOLUTION 4 - #define AUDIO_PIN C6 #define MUSIC_MAP diff --git a/keyboards/keyprez/rhino/info.json b/keyboards/keyprez/rhino/info.json index b203dc23d70..f92ce7b0b22 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 d5badd4ae15..80747b54be3 100644 --- a/keyboards/keyprez/unicorn/config.h +++ b/keyboards/keyprez/unicorn/config.h @@ -43,10 +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 ENCODER_RESOLUTIONS { 4 } -#define ENCODERS_PAD_A_RIGHT { D2 } -#define ENCODERS_PAD_B_RIGHT { D4 } -#define ENCODER_RESOLUTIONS_RIGHT {4} diff --git a/keyboards/keyprez/unicorn/info.json b/keyboards/keyprez/unicorn/info.json index 03de7b5c8c6..e3afebbc0f6 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 3fba4f8efa6..21661d533d3 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 86e3a070e90..910d8cc0eff 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 1aa7ff33ff4..75b25e02c37 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 @@ -53,5 +49,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/keystonecaps/gameroyadvance/info.json b/keyboards/keystonecaps/gameroyadvance/info.json index 703c6a864a6..7a968deded9 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 cc87fc39f79..1243e775d31 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 e143889119a..2fae7509853 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 ffae7d10fcf..f5f54eee2c3 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 7caa9824b05..f063fd2323f 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 adee0a4d10a..fadfdae7150 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 f9344727c11..cdd3f418354 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 9b0d9cf0c1c..2e9c83df4cb 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 04e5cf4f5a6..8392caa6890 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 b9ffc070766..a93fa6496ba 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 51a108cd7ed..d1e5d913403 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 b9150cbcfa1..b2d3cf21e5b 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 012c6a92393..3127ee94112 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 2caa2c27b63..b910faac329 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 2e49fafd4d8..3d06b6bc041 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 223bd710352..ae6ed513a27 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 f1dc869ab07..d5fe49330f1 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 c83e861c72f..168b3ba447f 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 70c80d42f6f..a698476a5f5 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 ENCODER_RESOLUTION 4 #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 d88a8b20bfb..84b17c43850 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 5ace53258ee..435c727db5d 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 d80aef23131..c0d8de34e9c 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 375e54504c0..8a5d4a50bc5 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 3e0084c1a7d..a255a480b3e 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 b180e248538..b70904fae3e 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 cb75c22dd60..83efb7b5e77 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, diff --git a/keyboards/latincompass/latinpad/config.h b/keyboards/latincompass/latinpad/config.h index 1b0881a0d5d..bfbdf01cd74 100644 --- a/keyboards/latincompass/latinpad/config.h +++ b/keyboards/latincompass/latinpad/config.h @@ -77,8 +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 } - -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/latincompass/latinpad/info.json b/keyboards/latincompass/latinpad/info.json index 4ab11d8cfba..b2f4199dfd0 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 7b6ac203892..fe0ab9999b7 100644 --- a/keyboards/latincompass/latinpadble/config.h +++ b/keyboards/latincompass/latinpadble/config.h @@ -84,9 +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 ENCODER_RESOLUTION 4 - #define VIA_HAS_BROKEN_KEYCODES diff --git a/keyboards/latincompass/latinpadble/info.json b/keyboards/latincompass/latinpadble/info.json index ed82794f821..266f09d8a06 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 8a239109565..3c6bf4e8a99 100644 --- a/keyboards/leafcutterlabs/bigknob/config.h +++ b/keyboards/leafcutterlabs/bigknob/config.h @@ -17,11 +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} -#define ENCODER_RESOLUTION 4 //default/suggested - /* 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 2a8830c308c..55d5fe13ee9 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 443139c8246..d89148dbbf5 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 ef53c7f2d5b..bc2eae23da8 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 0b11be778a6..3a0780e0a66 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 18e16cd4693..82e9affbd04 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 8ca3fd28b96..841a7bb7646 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 4daceb8e61f..fb05828f6d5 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 9508aeed575..19580b94640 100644 --- a/keyboards/linworks/whale75/config.h +++ b/keyboards/linworks/whale75/config.h @@ -44,11 +44,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 24cb27f9291..b84425f6f69 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} + ] + }, "backlight": { "pin": "A10", "levels": 5, diff --git a/keyboards/lizard_trick/tenkey_plusplus/config.h b/keyboards/lizard_trick/tenkey_plusplus/config.h index ec3b2e6c6da..c2d33c6ae7d 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 376f2dcf60f..eb8ef5e48d8 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 a165b3cb9d7..1ea347bfd61 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 faed6f473ca..f24e1a3f6f0 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 c3aa00f56e2..4ca12619823 100644 --- a/keyboards/lw67/config.h +++ b/keyboards/lw67/config.h @@ -21,11 +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 } -#define ENCODER_RESOLUTION 4 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lw67/info.json b/keyboards/lw67/info.json index 29579215dbb..f443702d69d 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 02e5be2413c..77a51635b45 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 ef55732d233..de5f70ca146 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 cad5a932107..110d7ecfe9d 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 025f1fe168d..f3102475d92 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": { diff --git a/keyboards/macro1/config.h b/keyboards/macro1/config.h index e707daef079..a03f212f374 100644 --- a/keyboards/macro1/config.h +++ b/keyboards/macro1/config.h @@ -21,11 +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 } -#define ENCODER_RESOLUTION 4 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/macro1/info.json b/keyboards/macro1/info.json index c79e7bd4389..ae4de403109 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 714f796f48f..00000000000 --- 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 89720d9b70d..780dfca3036 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 f74f3d90552..0d14bca0ea4 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 421f1283e13..47dbbc6d9a0 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 b07d3842a6b..c00353db890 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 9474d6c8041..77974305e57 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 c21ce974cbc..1839a1091d1 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 f781e92265b..cdf40f68015 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 ed819206169..bf7aa7f198d 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 7c4a6b43450..39de1d6bda0 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 13d647105a6..81acfef5536 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 bef63b4de03..ffe44159a0f 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 dd2e02f98e9..3756899498e 100644 --- a/keyboards/maxr1998/pulse4k/config.h +++ b/keyboards/maxr1998/pulse4k/config.h @@ -25,11 +25,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Rotary encoders */ -#define ENCODERS_PAD_A { D2, F6 } -#define ENCODERS_PAD_B { D3, F5 } -#define ENCODER_RESOLUTION 4 - /* 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 449a3fc0a52..9db0307940a 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 776c1311db3..365fed73401 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 dce66f746a1..865f05674f8 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 2f06367ab83..c86a3af0f12 100644 --- a/keyboards/mechanickeys/undead60m/config.h +++ b/keyboards/mechanickeys/undead60m/config.h @@ -49,8 +49,3 @@ #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE #endif - -/* Rotary encoder */ -#define ENCODERS_PAD_A { F6 } -#define ENCODERS_PAD_B { F5 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/mechanickeys/undead60m/info.json b/keyboards/mechanickeys/undead60m/info.json index c525db64202..9bee50289c5 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 9611ed6744f..d9d75a4b9e2 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h @@ -91,8 +91,4 @@ #define RGB_MATRIX_DISABLE_KEYCODES -#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/rev2/info.json b/keyboards/mechlovin/adelais/rgb_led/rev2/info.json index b83a4828e3e..7dcd0f1765f 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 faf032647fb..7457fd50a76 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 ENCODER_RESOLUTION 4 #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 89bf9abe9bb..3f83750e3a8 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 69af2941a64..254d2040381 100644 --- a/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h @@ -1,7 +1,3 @@ #pragma once -#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/rev3/info.json b/keyboards/mechlovin/adelais/standard_led/arm/rev3/info.json index a8d21313a22..60d20c4a29f 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 70fa00220b7..7905be18915 100644 --- a/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h @@ -16,8 +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 ENCODER_RESOLUTION 4 - #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 f4c096143b4..925b7cd213e 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 aac4aae40df..831642126b2 100644 --- a/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h @@ -45,8 +45,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 ENCODER_RESOLUTION 4 - #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 73ea66a9971..e385d5ef1a9 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"} + ] + }, "backlight": { "pin": "B5", "breathing": true diff --git a/keyboards/mechlovin/foundation/config.h b/keyboards/mechlovin/foundation/config.h index 73d42d4a496..951eab595b5 100644 --- a/keyboards/mechlovin/foundation/config.h +++ b/keyboards/mechlovin/foundation/config.h @@ -55,9 +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 ENCODER_RESOLUTION 4 #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 38f9cace081..bb7491ff191 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 a2b1b0311bd..b0791490a29 100644 --- a/keyboards/mechlovin/hex6c/config.h +++ b/keyboards/mechlovin/hex6c/config.h @@ -37,10 +37,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 ENCODER_RESOLUTION 4 - #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 e03f75c2b8b..387043bde66 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"} + ] + }, "backlight": { "pin": "B0", "breathing": true diff --git a/keyboards/mechlovin/zed65/no_backlight/retro66/config.h b/keyboards/mechlovin/zed65/no_backlight/retro66/config.h index cbc575ab938..4739a7c2b14 100644 --- a/keyboards/mechlovin/zed65/no_backlight/retro66/config.h +++ b/keyboards/mechlovin/zed65/no_backlight/retro66/config.h @@ -21,11 +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 ENCODER_RESOLUTION 4 #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 d2e9604146a..f14d88910bf 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 3d045762ca7..0d43d53bcd6 100644 --- a/keyboards/mechwild/bde/rev2/config.h +++ b/keyboards/mechwild/bde/rev2/config.h @@ -17,11 +17,4 @@ along with this program. If not, see . #pragma once -/* Encoder pins */ -#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/bde/rev2/info.json b/keyboards/mechwild/bde/rev2/info.json index 29ddb0e0176..4d27c538951 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 19dab9b25d2..62caa25bb36 100644 --- a/keyboards/mechwild/clunker/config.h +++ b/keyboards/mechwild/clunker/config.h @@ -19,8 +19,4 @@ //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D3 } -#define ENCODER_RESOLUTION 4 - #define SOLENOID_PIN F4 diff --git a/keyboards/mechwild/clunker/info.json b/keyboards/mechwild/clunker/info.json index cc9b8a1c594..89083afeb22 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 98bfeb56254..070fe36eb7a 100755 --- a/keyboards/mechwild/mercutio/config.h +++ b/keyboards/mechwild/mercutio/config.h @@ -22,12 +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 } - -/* encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW or ROW2COL */ diff --git a/keyboards/mechwild/mercutio/info.json b/keyboards/mechwild/mercutio/info.json index b0596e76e5b..98c815c6a80 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 0638945b902..92a8dfa3234 100644 --- a/keyboards/mechwild/mokulua/mirrored/config.h +++ b/keyboards/mechwild/mokulua/mirrored/config.h @@ -8,12 +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 } - -/* Encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/mokulua/mirrored/info.json b/keyboards/mechwild/mokulua/mirrored/info.json index ea140fca0ee..29d2497cc11 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 db224094db8..b720c271b2a 100644 --- a/keyboards/mechwild/mokulua/standard/config.h +++ b/keyboards/mechwild/mokulua/standard/config.h @@ -8,12 +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 } - -/* Encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/mokulua/standard/info.json b/keyboards/mechwild/mokulua/standard/info.json index 0fd80e4c888..d3451698f6c 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 b190f9af869..d3158c33066 100644 --- a/keyboards/mechwild/murphpad/config.h +++ b/keyboards/mechwild/murphpad/config.h @@ -22,12 +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 } - -/* Encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/murphpad/info.json b/keyboards/mechwild/murphpad/info.json index 57a3c8fa8d3..92af56f0ddb 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 25f9b62394d..72efdae1e2b 100644 --- a/keyboards/mechwild/obe/config.h +++ b/keyboards/mechwild/obe/config.h @@ -31,12 +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 } - -/* encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/obe/info.json b/keyboards/mechwild/obe/info.json index 806333a0fa1..cbe9f7cfa80 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 0487c5322ac..bf2e1a0b58d 100644 --- a/keyboards/mechwild/puckbuddy/config.h +++ b/keyboards/mechwild/puckbuddy/config.h @@ -42,12 +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 } - -/* encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/puckbuddy/info.json b/keyboards/mechwild/puckbuddy/info.json index d0af030ff34..825def96a22 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 5403cd0ddcb..88b160a9806 100644 --- a/keyboards/mechwild/waka60/config.h +++ b/keyboards/mechwild/waka60/config.h @@ -31,12 +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 } - -/* encoder resolution */ -#define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 /* COL2ROW, ROW2COL */ diff --git a/keyboards/mechwild/waka60/info.json b/keyboards/mechwild/waka60/info.json index 8e9a2c11f12..eb7d2d9f545 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 0bf850043ca..4c05b1d83bd 100644 --- a/keyboards/meletrix/zoom65/config.h +++ b/keyboards/meletrix/zoom65/config.h @@ -22,14 +22,6 @@ #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 18be91ee263..0968df47946 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/zoom65.c b/keyboards/meletrix/zoom65/zoom65.c index f69ed547eff..ff27a4442fa 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 0bf850043ca..4c05b1d83bd 100644 --- a/keyboards/meletrix/zoom65_lite/config.h +++ b/keyboards/meletrix/zoom65_lite/config.h @@ -22,14 +22,6 @@ #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 f3839d2e883..d5dcd621ef4 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/meletrix/zoom65_lite/keymaps/via/keymap.c b/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c index de44abe37e9..23729b43496 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/merge/iso_macro/config.h b/keyboards/merge/iso_macro/config.h index cde82e73416..7bf2b1b33bb 100644 --- a/keyboards/merge/iso_macro/config.h +++ b/keyboards/merge/iso_macro/config.h @@ -22,8 +22,3 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - - -#define ENCODERS_PAD_A { F0, D0 } -#define ENCODERS_PAD_B { F1, D1 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/merge/iso_macro/info.json b/keyboards/merge/iso_macro/info.json index 123438a5be9..bc4269755fe 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"} + ] + }, "backlight": { "pin": "B7" }, diff --git a/keyboards/merge/uc1/config.h b/keyboards/merge/uc1/config.h index 488b2cfed35..9dcfb6e0744 100644 --- a/keyboards/merge/uc1/config.h +++ b/keyboards/merge/uc1/config.h @@ -39,7 +39,3 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F6 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/merge/uc1/info.json b/keyboards/merge/uc1/info.json index d42f88c7948..55b68a4510c 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 69500ee6037..c249a1816a6 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 3c57c774927..e548d63151e 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 bba359e02f1..238e5f6d436 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 a467a97c77c..e3e1359c927 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 4cbb5833212..6d21adc7741 100644 --- a/keyboards/merge/uma/config.h +++ b/keyboards/merge/uma/config.h @@ -24,6 +24,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 11ccd102a52..13637052536 100644 --- a/keyboards/merge/uma/info.json +++ b/keyboards/merge/uma/info.json @@ -11,6 +11,11 @@ "backlight": { "pin": "C6" }, + "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 83501eb878d..916b3157255 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 - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/metamechs/timberwolf/info.json b/keyboards/metamechs/timberwolf/info.json index 4d6e82eec67..ae12912f00a 100644 --- a/keyboards/metamechs/timberwolf/info.json +++ b/keyboards/metamechs/timberwolf/info.json @@ -12,6 +12,11 @@ "pin": "C6", "levels": 16 }, + "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 56d73345af2..208e11fc1cb 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 a5709d78284..ea42f18d309 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 bbdf124f0e9..ab1d6e7c516 100644 --- a/keyboards/millipad/config.h +++ b/keyboards/millipad/config.h @@ -37,9 +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 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/millipad/info.json b/keyboards/millipad/info.json index f0a0f2da180..9469f2babaf 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 915b3fccb48..9c7e498de3d 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 140214d7268..fafc7955748 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 84ee3ee6f6a..3567b555ac0 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 cfe0bc16b2e..1773beff05b 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 70c1d76832d..e69e49b06b5 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 351fb8a5a5e..272c37ff506 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 a4969498ed0..7c6748c574c 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 95748659e48..2c71926b81e 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 a9d1ecbd31c..922e4117e68 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 e6b2ef09611..ed827231084 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 584a8f85b78..3af1d02f47c 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 400e3fa10e2..7fa60c79f83 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 01d226ce4c7..84cd0fbca18 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 0005f030e46..bd9c4b6e4e7 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 8ee1c8f94d1..2687ada0d93 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/ml/gas75/keymaps/via/keymap.c b/keyboards/ml/gas75/keymaps/via/keymap.c index b609f9d1429..b5e3055427b 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/mlego/m48/rev1/config.h b/keyboards/mlego/m48/rev1/config.h index ab6ad489383..04c1bb45092 100644 --- a/keyboards/mlego/m48/rev1/config.h +++ b/keyboards/mlego/m48/rev1/config.h @@ -21,14 +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 } -#define ENCODER_RESOLUTION 4 -#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 83eda36107d..ecfa4dc940a 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 59311714401..7805e6e82b1 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 9363527fe91..e9e03cb1898 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 adb8bd0783f..a835d8c4f31 100644 --- a/keyboards/mlego/m60_split/rev1/config.h +++ b/keyboards/mlego/m60_split/rev1/config.h @@ -27,15 +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 } -#define ENCODER_RESOLUTIONS \ - { 4 } -#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 fc9a608c9e3..237b933eb03 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 e5ebf934382..2bb9334497d 100644 --- a/keyboards/mlego/m60_split/rev2/config.h +++ b/keyboards/mlego/m60_split/rev2/config.h @@ -27,17 +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 } -#define ENCODER_RESOLUTIONS \ - { 4 } - -#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 b2b49279c1f..4e281733e1c 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 ac1f935350c..d58ee7627ff 100644 --- a/keyboards/mlego/m65/rev1/config.h +++ b/keyboards/mlego/m65/rev1/config.h @@ -24,17 +24,10 @@ 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 -#define ENCODER_RESOLUTION 4 - #undef RGBLED_NUM #define RGBLED_NUM 20 #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/mlego/m65/rev1/info.json b/keyboards/mlego/m65/rev1/info.json index 9635b31e59f..f4d8ba75786 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 3c2e8775505..8094879b1c5 100644 --- a/keyboards/mlego/m65/rev2/config.h +++ b/keyboards/mlego/m65/rev2/config.h @@ -24,17 +24,10 @@ 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 -#define ENCODER_RESOLUTION 4 - #undef RGBLED_NUM #define RGBLED_NUM 20 #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/mlego/m65/rev2/info.json b/keyboards/mlego/m65/rev2/info.json index 2bde6bdef19..7d265197cae 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 abeaeffc888..4a71449cb01 100644 --- a/keyboards/mlego/m65/rev3/config.h +++ b/keyboards/mlego/m65/rev3/config.h @@ -24,14 +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 } -#define ENCODER_RESOLUTION 4 -#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 8240ae7aceb..39c26191c66 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 c2bd69f3638..a8b9b596d50 100644 --- a/keyboards/mlego/m65/rev4/config.h +++ b/keyboards/mlego/m65/rev4/config.h @@ -24,14 +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 } -#define ENCODER_RESOLUTION 4 -#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 465b61f2aa4..91af43a6a1f 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 3f7a66bf06e..2d319c4fdf8 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 - #define BACKLIGHT_PWM_DRIVER PWMD3 #define BACKLIGHT_PWM_CHANNEL 1 #define BACKLIGHT_PAL_MODE 1 diff --git a/keyboards/monarch/info.json b/keyboards/monarch/info.json index c4d1362a5b6..95fafb5eb48 100644 --- a/keyboards/monarch/info.json +++ b/keyboards/monarch/info.json @@ -13,6 +13,11 @@ "levels": 24, "breathing": true }, + "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 a2c48696905..cbf4c9b8df7 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 cac145319ca..8c2aec4e4d0 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 fff82c341d3..00506c85bc8 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 3d0df411776..2f9338afc34 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 3c89fff25ce..58cf478e13a 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 cde8ba679d0..dd76ea25e9f 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 14f87681bf2..b54258280b7 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 223129a9e32..f334ebc63f4 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 dc85bb4fc7d..290871bde5d 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 19a735ebc50..ec0d58b07ec 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/alicekk/keymaps/via/keymap.c b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c index 62068bd43e3..6c21e053fa9 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/mw65_black/config.h b/keyboards/mwstudio/mw65_black/config.h index 3f5d53797de..79d1d5e1b24 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 030936eaef6..23151df6868 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 62cfab574b1..2a90d77ee98 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 d09a0d7b3a7..ee00dd70c13 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 7c8ab74588d..4cb7a8a22cd 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 bc4404203fc..866f488a6ee 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 bd39ed9b280..b5f4500d58f 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 621d9beafae..4d794246eb2 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": { diff --git a/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c b/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c index e94667954ee..7b7e1877f5c 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/ncc1701kb/config.h b/keyboards/ncc1701kb/config.h index 959be9fb724..adfe863976b 100644 --- a/keyboards/ncc1701kb/config.h +++ b/keyboards/ncc1701kb/config.h @@ -22,11 +22,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D4, D6, D7 } #define MATRIX_COL_PINS { B4, B5, B6 } -/*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 9c26601ae94..828eefef025 100644 --- a/keyboards/ncc1701kb/info.json +++ b/keyboards/ncc1701kb/info.json @@ -12,19 +12,24 @@ "pin": "B7", "breathing": true }, + "encoder": { + "rotary": [ + {"pin_a": "D0", "pin_b": "D1"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { "LAYOUT": { "layout": [ - {"x":0, "y":0}, - {"label":"Encoder", "x":1, "y":0}, - {"x":2, "y":0}, - {"x":0, "y":1}, - {"x":1, "y":1}, + {"x":0, "y":0}, + {"label":"Encoder", "x":1, "y":0}, + {"x":2, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, {"x":2, "y":1}, - {"x":0, "y":2}, - {"x":1, "y":2}, + {"x":0, "y":2}, + {"x":1, "y":2}, {"x":2, "y":2} ] } diff --git a/keyboards/neito/config.h b/keyboards/neito/config.h index b15db6b6167..0e5ca7a6b6f 100644 --- a/keyboards/neito/config.h +++ b/keyboards/neito/config.h @@ -19,9 +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 ENCODER_RESOLUTION 4 #define GRAVE_ESC_CTRL_OVERRIDE diff --git a/keyboards/neito/info.json b/keyboards/neito/info.json index 09457315a78..7455762b519 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": { "pin": "B5", "levels": 5, diff --git a/keyboards/neopad/rev1/config.h b/keyboards/neopad/rev1/config.h index 74f394e8c7f..dce1020b444 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 f0ced98faae..48654b69411 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 a0873dfce1a..dece45d140d 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 52f364ef0ac..7316afacb92 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 070224510ca..e4e99106a38 100644 --- a/keyboards/nightly_boards/adellein/config.h +++ b/keyboards/nightly_boards/adellein/config.h @@ -51,12 +51,6 @@ along with this program. If not, see . #endif /* 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/encoder_action.c b/keyboards/nightly_boards/adellein/encoder_action.c index 042a3871c97..6b553d3969e 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/adellein/info.json b/keyboards/nightly_boards/adellein/info.json index 58b49b32904..7967cfc99b4 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 3bd829623a7..055aea6055a 100644 --- a/keyboards/nightly_boards/n40_o/config.h +++ b/keyboards/nightly_boards/n40_o/config.h @@ -51,12 +51,6 @@ along with this program. If not, see . #endif /* 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/encoder_action.c b/keyboards/nightly_boards/n40_o/encoder_action.c index 042a3871c97..6b553d3969e 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/n40_o/info.json b/keyboards/nightly_boards/n40_o/info.json index e2ccad4db31..f68bc89be36 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 c892acd41aa..7ec0b48079d 100644 --- a/keyboards/nightly_boards/n60_s/config.h +++ b/keyboards/nightly_boards/n60_s/config.h @@ -35,12 +35,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* 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/encoder_action.c b/keyboards/nightly_boards/n60_s/encoder_action.c index 042a3871c97..6b553d3969e 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/n60_s/info.json b/keyboards/nightly_boards/n60_s/info.json index 37a0d3895c5..519f31cf286 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 e5e87f04dcd..44868adff68 100644 --- a/keyboards/nightly_boards/octopad/config.h +++ b/keyboards/nightly_boards/octopad/config.h @@ -51,12 +51,6 @@ along with this program. If not, see . #endif /* 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/encoder_action.c b/keyboards/nightly_boards/octopad/encoder_action.c index 042a3871c97..6b553d3969e 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/octopad/info.json b/keyboards/nightly_boards/octopad/info.json index ce794f28a81..d6dfc74805f 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 dc61f0a039f..5936e812c82 100644 --- a/keyboards/nightly_boards/octopadplus/config.h +++ b/keyboards/nightly_boards/octopadplus/config.h @@ -34,14 +34,7 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - -/* 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 8f0d6766e0c..0dbd1dee708 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 0d85df49976..a280d81458d 100644 --- a/keyboards/nixkeyboards/day_off/config.h +++ b/keyboards/nixkeyboards/day_off/config.h @@ -22,10 +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 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/nixkeyboards/day_off/info.json b/keyboards/nixkeyboards/day_off/info.json index 145da5d2f4a..4a9d7bbff6e 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 4f154d3c693..80a7793edb7 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 07a1ce0a102..bf6b9234b06 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 92a82ab267a..555a0c488f5 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 a1333c1c5e2..00fe51e3813 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 cd4d98e943c..3a09f4060d0 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 a5612a8c149..7ae6325768f 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 2d203594bf7..af85027e648 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 b59fee24115..5c69cb0e7ec 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 6a7742ce878..bb0ee7d7854 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 0acb6993735..77a00d91f4b 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 dd2ae627496..d3b3c44222c 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 ba27823b360..5255c32205e 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 37f05b06e20..23b2f5f1a4c 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 ec014a66809..cce2a2902cc 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": { diff --git a/keyboards/om60/config.h b/keyboards/om60/config.h index 6a647475a28..9af406eec55 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 4da5396c58b..c33231efe8c 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 6d1cd822c9e..70eb0ad47f1 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 d964098f3d5..20836516345 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 adacefb87c9..b6a1f1d52cc 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 f918fbe2586..578cb2b907b 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 d41fc84295d..9a1aacc4fa0 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 ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 diff --git a/keyboards/owlab/voice65/hotswap/info.json b/keyboards/owlab/voice65/hotswap/info.json index b17375dd5cf..7a5215bf86a 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 fb6cb8c7aab..fc5aafd1cef 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 ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 diff --git a/keyboards/owlab/voice65/soldered/info.json b/keyboards/owlab/voice65/soldered/info.json index 8135dcf29d9..4a3c8a69366 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"], diff --git a/keyboards/p3d/glitch/config.h b/keyboards/p3d/glitch/config.h index c53685cf2ea..961897c4d65 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 9de0250289f..9aee029a07a 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 391e429afed..2b450e8fff3 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 ce40842afee..3859d7852f7 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 a8e50b43c4c..4505e2718e7 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 cea8ee87a0b..1c5781995f6 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 34898d5ee9a..d3c5f5edc07 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 0b33a857227..6698af203be 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/pauperboards/brick/info.json b/keyboards/pauperboards/brick/info.json index a5dd2522cd6..62a104a337b 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/pearlboards/atlas/config.h b/keyboards/pearlboards/atlas/config.h index ee2c5f14907..92cef2fde0d 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 31cf97aa4ed..77c129e79fe 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 bd198d9758a..c039db9a159 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 592fecff65d..0114fb8e78b 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 99473d96e0b..deb979dd061 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 c5b1fb640c3..3d2f44a892c 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 84c4f2d784f..f61e11fca90 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 0558b83aad1..3258e758a87 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 d25cf13f5a7..78ade39d772 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 597c7b98e54..d6663796f87 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 9429a2261fc..c97fab915a3 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 00afdbbdc7a..24e57770459 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 9429a2261fc..c97fab915a3 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 00afdbbdc7a..24e57770459 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 15b2ad262fc..7138fe39391 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/pica40/rev2/info.json b/keyboards/pica40/rev2/info.json index 99540900b94..dbef8254ef9 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", diff --git a/keyboards/pica40/rev2/rev2.h b/keyboards/pica40/rev2/rev2.h index 473011fbb03..95932f78178 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/planck/ez/config.h b/keyboards/planck/ez/config.h index a569b3d5908..04bfc314ce6 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 9e400ee45fe..ae67be691dd 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 0852b7baa96..a60c086b5b6 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 6e46d01954c..9cc60ab5f02 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 bd78de6257d..192d3fc6d8e 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 f2a3db50826..828f0c20b8e 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 ed6b52d05c4..bd93164345c 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 8824929a390..50ee36da3bf 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 47d5538ca83..21c01e89ee5 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 019fdd1acde..faeb0df2f42 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 11c68835904..12721a16b05 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 a6d3fa1d357..0185fe83bbd 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 a777ded38b8..2269aef97fe 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 0f396fc87ef..cc3b9444712 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 071b7bc667a..4d1bfe67b9b 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 c8095a62e69..3f32a10b363 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 417ab0e4730..261ebaca5bc 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 e27a7b66180..eeab79d169c 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 7c98c3ed717..252a110e8ba 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 d93c7ee5d2a..baa5b5263bd 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 5c07c8e1063..9d0820b4e62 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 0d40b434e8e..457e2f0ab38 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 467c8293e80..488d81b6b84 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 1a54f156876..b70109bfa30 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 a8a4dcba8ec..ecfa953fd41 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 4ebfa1b381d..e3f3faca9cc 100644 --- a/keyboards/protozoa/p01/config.h +++ b/keyboards/protozoa/p01/config.h @@ -21,11 +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 -#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 d4c6872ef5a..77e1449458b 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 bcadefe2ff5..91922c6d953 100644 --- a/keyboards/psuieee/pluto12/config.h +++ b/keyboards/psuieee/pluto12/config.h @@ -8,11 +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 } -#define ENCODER_RESOLUTION 4 - /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/psuieee/pluto12/info.json b/keyboards/psuieee/pluto12/info.json index 422973a6d1a..752b2ab97f2 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 a053dc0c165..be1de23f838 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 6cd22fe6c79..c65b15cfb25 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 4e0699c9739..ba9c6fdc712 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 77d5495d867..b232007bb24 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"], diff --git a/keyboards/qpockets/eggman/config.h b/keyboards/qpockets/eggman/config.h index c86f64f0894..eac213400ab 100644 --- a/keyboards/qpockets/eggman/config.h +++ b/keyboards/qpockets/eggman/config.h @@ -23,10 +23,3 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - -/* 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/eggman/info.json b/keyboards/qpockets/eggman/info.json index 5d63633cfae..989402411db 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 3970a071979..22c2bc73dee 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 394a03b5ee0..cd9dcb56a8a 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 f3dff6bd3d5..26b85360c43 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 e895a35d4de..580ab0a4d52 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 4672368ef55..a811be9a74c 100644 --- a/keyboards/qpockets/wanten/config.h +++ b/keyboards/qpockets/wanten/config.h @@ -34,13 +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 } - -#define ENCODER_RESOLUTION 4 -//#define ENCODER_DIRECTION_FLIP - /* * 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 61ff2f78dae..e35237a358b 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 7c6547aabd4..830b5364a5e 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 ef0088d47a5..f2930137d26 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 9eb4366cb0e..4de51720eaa 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 1d3f5cb90a5..5a425f97a86 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" }, diff --git a/keyboards/rainkeebs/rainkeeb/config.h b/keyboards/rainkeebs/rainkeeb/config.h index 8f7a2d21919..d26c7024d94 100644 --- a/keyboards/rainkeebs/rainkeeb/config.h +++ b/keyboards/rainkeebs/rainkeeb/config.h @@ -28,8 +28,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* encoder pads */ -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B6 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/rainkeebs/rainkeeb/info.json b/keyboards/rainkeebs/rainkeeb/info.json index 34705a980a5..bddacf6ddb1 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 6a050234236..d884b126808 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 1b01a4d2262..ac3014fe7a1 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 14d8f62893c..eb5b0be4227 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 81781cdb7e5..40c5f39bebb 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 dec3ab7cc22..f6817e71cea 100644 --- a/keyboards/rart/rart75hs/config.h +++ b/keyboards/rart/rart75hs/config.h @@ -31,10 +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 ENCODER_RESOLUTION 4 //default/suggested - #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 a7ac977112b..27984a03d75 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 1bb4ae52635..0b08f0322f2 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 094bb55b8d0..1d0f0e23580 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 facb9f1486a..aee0fdd8629 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 8dbc85f13f9..5cfc6b7b70e 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 5a8d6f7849c..4a8e14be49f 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 03918a6886d..016b0c49c83 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 bdbe5de0da1..948c87264a2 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 e0ad3440a3f..cab8ef68b42 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 5f7185c9268..b79e4dcbe3e 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 9a212a859be..743ff18155e 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 587d3e0cc05..c39e49f375e 100644 --- a/keyboards/redox_media/config.h +++ b/keyboards/redox_media/config.h @@ -29,7 +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 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/redox_media/info.json b/keyboards/redox_media/info.json index 2404812e7de..9f4442885c5 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/reedskeebs/alish40/info.json b/keyboards/reedskeebs/alish40/info.json index c1ae80e9cdf..a4f862bec99 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/reviung/reviung5/config.h b/keyboards/reviung/reviung5/config.h index 66552b7f97c..aceb9655f6c 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 8422e881172..622c880a429 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 5fbfc1cbfd1..8f961078bd4 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 774fa27a948..b68a1586c56 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/config.h b/keyboards/rgbkb/pan/config.h index 6f5c2c1db62..05d446d05da 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/rgbkb/pan/rev1/32a/config.h b/keyboards/rgbkb/pan/rev1/32a/config.h index 103cb4e5f88..5e7c4babbd3 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 32a75ca0fcb..1f7ece37eb4 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 988bf60eca1..f25713b2be3 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 c06ffbaf069..5fd7124b9c0 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 48f341583d0..fcef317e1ff 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 4182ce4c03d..eb742972b10 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 a4c7d1e30e3..727947ef0b9 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 76eaf07f075..046a56f390c 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 9ea7a3dc8fd..85b6a68b79d 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 d308819a423..cc25a74b730 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 b92bc6d73f0..df9875ed47a 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 e44966dabfb..7bf6fe4b0dc 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 286bb0397f8..290aad3ae70 100644 --- a/keyboards/ristretto/config.h +++ b/keyboards/ristretto/config.h @@ -29,7 +29,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define ENCODERS_PAD_A { D4 } -#define ENCODERS_PAD_B { D6 } -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/ristretto/info.json b/keyboards/ristretto/info.json index 3425dc03e6f..ac6d80c3c70 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 0c9e3da4cad..cd4c43391bb 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 654da4ace8d..bdca6506f1c 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 e6195dc87c5..ddf1d3199d4 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 6a365b17c11..5eebdf3b79c 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 07ac58f7568..20e98b3d533 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 febd39bdf5c..17236053caf 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 194b0c9511b..baf134e5e92 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 d1aa7833369..c4773046582 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 6988284d944..c2462c16199 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 b5638b1829c..520829d07e2 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 29db0066eb5..b6d39fd63dc 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 4e81d951a7b..793bad257cd 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 5acc8ffa5a6..65a32fc3551 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 2bc5e96058e..b893720ddfe 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 69ae795845d..d80fa7ec35c 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 b8ad9447921..c9120a2f483 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 3581b8adaab..1a6ca8ac73c 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 */ diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/config.h b/keyboards/sawnsprojects/krush/krush65/hotswap/config.h index 236de4d395a..8a947093dc9 100644 --- a/keyboards/sawnsprojects/krush/krush65/hotswap/config.h +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/config.h @@ -25,11 +25,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/encoder_actions.c b/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c index 039f8739b4d..8a91dde19a4 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/hotswap/info.json b/keyboards/sawnsprojects/krush/krush65/hotswap/info.json index 43faca44376..3872047ef8b 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 22303a478df..76f4acfbf6f 100644 --- a/keyboards/sawnsprojects/krush/krush65/solder/config.h +++ b/keyboards/sawnsprojects/krush/krush65/solder/config.h @@ -23,11 +23,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* rotary */ -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { B3 } -#define ENCODER_RESOLUTION 4 - #define RGB_DI_PIN F1 #ifdef RGB_DI_PIN #define RGBLED_NUM 20 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 039f8739b4d..00000000000 --- 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 fb226326324..00000000000 --- 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/info.json b/keyboards/sawnsprojects/krush/krush65/solder/info.json index a0661b715a6..96661272996 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/sawnsprojects/krush/krush65/solder/solder.c b/keyboards/sawnsprojects/krush/krush65/solder/solder.c index b8a7729725c..501d70d1bd6 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/sck/gtm/config.h b/keyboards/sck/gtm/config.h index 15c3c5e114e..f4961f22425 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 12ad6c917cf..3f254f2c778 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 03b5e62bb55..5bbc6a38f9c 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 495a525a43c..178d763b0de 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 08941df1ac8..f1a5385a3cc 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 46889dbd1e6..9ac1a0a20c0 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 3eef4a6d17d..c0c6902e3b6 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 7de72f1abfa..2ba227e4a86 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 f1da1c329ce..cae120ac7e5 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 c2c0b011a30..6890765f7f9 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 3369c06fbad..26bddb382a7 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 02bf2c5e95a..cb7226ae81b 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 1528744d69f..23a01323059 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 2d07121a7a2..723fe70fb95 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 f91a242b082..78b024604c6 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 894e61c2562..65c8ff41d1e 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 9eb0f90cfd0..486442bcf1f 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 536ae84ea77..1a788b77ec6 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 a3caf29ac4d..c65caad1deb 100755 --- a/keyboards/sofle/keyhive/config.h +++ b/keyboards/sofle/keyhive/config.h @@ -26,14 +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 { 4 } -#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 b8e0cccbab3..f1d76cb7889 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 8d928df4c6d..34886b3be1c 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 911f90ccbcf..4a113ec2f28 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 2f9127e4e85..411f2c25789 100644 --- a/keyboards/spacey/config.h +++ b/keyboards/spacey/config.h @@ -17,11 +17,6 @@ along with this program. If not, see . #pragma once - -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D1 } -#define ENCODER_RESOLUTION 4 - /* * Keyboard Matrix Assignments * diff --git a/keyboards/spacey/info.json b/keyboards/spacey/info.json index fc6b1d1f367..c24d46d753b 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 5c9c282e000..8ca0d50ea65 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 86006546c79..895f9283ac1 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 e26e0cffda9..1799c6aa496 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 e30432b7183..d21d820804e 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 0cb93e77af5..c06c192e0d1 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 ab1b8ae020f..077421904c0 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 2b69934ff2e..e6162107051 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 516fcb7a72e..4bf206e4e58 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 de6dd2ff207..4efc0635a17 100644 --- a/keyboards/stello65/beta/config.h +++ b/keyboards/stello65/beta/config.h @@ -20,15 +20,8 @@ /* 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/encoder_actions.c b/keyboards/stello65/beta/encoder_actions.c index 0f32ac2723a..72970a2ffc3 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/stello65/beta/info.json b/keyboards/stello65/beta/info.json index b38ff6e3f37..d4e73eba1d7 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/sthlmkb/lagom/info.json b/keyboards/sthlmkb/lagom/info.json index 932ba359d3f..410d22512ef 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 8340eb83725..232ada4bace 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/swiftrax/retropad/config.h b/keyboards/swiftrax/retropad/config.h index 6cf8c0d22b2..f963856c97c 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 700ec883b88..ea43a71b12b 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 0c3df697ef4..f9b40cedee9 100644 --- a/keyboards/synapse/config.h +++ b/keyboards/synapse/config.h @@ -26,12 +26,4 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* ROTARY ENCODERS */ -#define ENCODERS_PAD_A \ - { D7, C7 } -#define ENCODERS_PAD_B \ - { D6, C6 } - -#define ENCODER_RESOLUTION 4 - #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/synapse/info.json b/keyboards/synapse/info.json index 55860f9f264..ff629b48c55 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 da4499d8dd7..3411aa9f688 100644 --- a/keyboards/synthlabs/solo/config.h +++ b/keyboards/synthlabs/solo/config.h @@ -3,11 +3,6 @@ #pragma once - -#define ENCODERS 1 -#define ENCODER_RESOLUTION 4 -#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 23566e95583..14d39d63ccd 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] }, diff --git a/keyboards/synthlabs/solo/keymaps/via/keymap.c b/keyboards/synthlabs/solo/keymaps/via/keymap.c index 7949c61375f..c6634c42d42 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/center_enter/config.h b/keyboards/takashicompany/center_enter/config.h index 7407855ff24..f77a42f59f1 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 edc871c3175..7c268e3f632 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 24641f2071b..3f6f0115242 100644 --- a/keyboards/takashicompany/compacx/config.h +++ b/keyboards/takashicompany/compacx/config.h @@ -34,10 +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 } - #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 08cd4a10109..bcd4489a98c 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 dc75fc44aba..4048cb9bf63 100644 --- a/keyboards/takashicompany/dogtag/config.h +++ b/keyboards/takashicompany/dogtag/config.h @@ -37,10 +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 } - #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 cf6fd671358..caa007fcc5d 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 1e050f5defb..726f4507c89 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 b7ed85676f4..6f92e86c882 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 99bbfdf6713..00000000000 --- a/keyboards/takashicompany/spreadwriter/config.h +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2022 takashicompany (@takashicompany) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - - -#define ENCODER_RESOLUTION 4 -#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 86f250966a3..16450db96e3 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/takashicompany/spreadwriter/keymaps/via/config.h b/keyboards/takashicompany/spreadwriter/keymaps/via/config.h index adbbc6ce838..9587fd7b6b8 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 7d9a5cebf92..e04c1fea0d3 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/taleguers/taleguers75/config.h b/keyboards/taleguers/taleguers75/config.h index e3c03f7afe4..ac0ea7c3389 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 62761093d74..936086beb3d 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 75ca5885a1e..6c0cbb80b9c 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 36382c46484..fb59374d1d7 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 af42a625433..5cb9e23c57b 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 c0b9742dd01..382c4b28618 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 0349a424573..a9b6cfc37df 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 9c1a9c8f5f9..63ebced12b9 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 0349a424573..a9b6cfc37df 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 c6dc44ccec4..487680f1375 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 a2a171890d2..49f53eff7ae 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 ee19795db33..999de9648c3 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 c91329ccd3d..04abd8bcc11 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 c84a742761e..bac10fbe13e 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 7c7c2dd940b..16d91b69a2e 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 356d54e67a5..4d91a00c84b 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 e069c29c86e..1eda8feab41 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 2a8814d840a..e94e8968582 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 2594685f054..8161a873e51 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 94b09cade1b..0b0877b38bd 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 70d1b76bea6..b758c909d21 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 cdddc688d1d..9797c96f467 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 3066ba475cd..f6193c35814 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 14c0e6d7cb3..8f667298f84 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 1b402683c78..db5d26d665f 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 dab37baf045..ce90b22975d 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 98de5f0db11..edde93be3ee 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 65be217368d..3c20e5162e7 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 67d71612795..0b56ef812d1 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 4f878b2620d..44b2f9a5dd5 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 5d51ecd9f44..04db2f16656 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 2a11247d923..1495d5137a2 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 bb2bd6f6e2e..e8b2abc1f63 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 cceaf637e5a..19f5e520601 100644 --- a/keyboards/tzarc/djinn/info.json +++ b/keyboards/tzarc/djinn/info.json @@ -35,7 +35,19 @@ }, "split": { "enabled": true, - "main": "pin" + "main": "pin", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "C15", "pin_b": "C14", "resolution": 2} + ] + } + } + }, + "encoder": { + "rotary": [ + {"pin_a": "C14", "pin_b": "C15", "resolution": 2} + ] }, "layouts": { "LAYOUT_all": { diff --git a/keyboards/ungodly/launch_pad/config.h b/keyboards/ungodly/launch_pad/config.h index 2d7aa5fa0a9..dc63dc77bdf 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 0adbbc45b15..a6e12f3374d 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 85880e4e637..ce4d927f09f 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 34b10245a87..23ffafcad17 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 4e95b4bba16..6e3ba625e28 100644 --- a/keyboards/unison/v04/config.h +++ b/keyboards/unison/v04/config.h @@ -25,13 +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 } - #define ENCODER_RESOLUTION 4 //the default & suggested is 4 -#endif - /* Audio */ #ifdef AUDIO_ENABLE #define AUDIO_PIN C6 diff --git a/keyboards/unison/v04/info.json b/keyboards/unison/v04/info.json index cc0c77609bf..a772d344d25 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] }, diff --git a/keyboards/viendi8l/config.h b/keyboards/viendi8l/config.h index 840413612ef..3036f0ac8fa 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 9b8591ee228..312f97e7f1b 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 c8a560b40fb..a4789be9b7a 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 cc6f72f76c2..3e38c540e6b 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 12d56ce32d8..8b7c6fdc7d7 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 b84a224bce6..33cc1f6dcb3 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": { diff --git a/keyboards/walletburner/cajal/config.h b/keyboards/walletburner/cajal/config.h index 94165e1f7b0..61e2d421aeb 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 423ce13f6a9..7aa0563d4c5 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 752f11ca3d2..62f5ba6633c 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 fab5a603d3d..17f01e24e2d 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 605400150ec..c720fc2103d 100644 --- a/keyboards/wekey/we27/config.h +++ b/keyboards/wekey/we27/config.h @@ -99,19 +99,8 @@ 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_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/encoder_actions.c b/keyboards/wekey/we27/encoder_actions.c index 0f32ac2723a..72970a2ffc3 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/wekey/we27/info.json b/keyboards/wekey/we27/info.json index e47fb351859..0a114ad5487 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 f093f88b95b..620a7f6e6ba 100644 --- a/keyboards/winry/winry315/config.h +++ b/keyboards/winry/winry315/config.h @@ -3,18 +3,7 @@ #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 } -#define ENCODER_RESOLUTION 4 - // 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/info.json b/keyboards/winry/winry315/info.json index 1b550c31225..4039d5aaf58 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/winry/winry315/keymaps/via/encoder_actions.c b/keyboards/winry/winry315/keymaps/via/encoder_actions.c index 96dfe74bcaf..9a9092effd3 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/work_louder/loop/config.h b/keyboards/work_louder/loop/config.h index 6b00a7f6c7e..1e17946cef6 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 25641426d1b..df4a5c1be04 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 a874f21761e..bfe04592ac1 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 b3bfcd6a133..3627122102f 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 770da02bfee..9148cf1abf8 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 1f33088a7c9..3eb050b92ad 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 47bb15d1beb..d9da63eb508 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 e354390d83a..5e934e90e0d 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 41864db4ebc..72e110cc6ba 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 72e96144f15..184ddea75b7 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 3ae0303bebb..8d9a74f5aad 100644 --- a/keyboards/wuque/mammoth20x/config.h +++ b/keyboards/wuque/mammoth20x/config.h @@ -29,17 +29,6 @@ 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 a87798679f2..b251951becb 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/mammoth20x/mammoth20x.c b/keyboards/wuque/mammoth20x/mammoth20x.c index da6ccecd3be..6cc1dee21ab 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 94b05d1eb20..55702e33527 100644 --- a/keyboards/wuque/mammoth75x/config.h +++ b/keyboards/wuque/mammoth75x/config.h @@ -29,17 +29,6 @@ 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 4bb3a29dd71..b668948f46c 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/mammoth75x/mammoth75x.c b/keyboards/wuque/mammoth75x/mammoth75x.c index 6f14657f889..c2bf2bbe377 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 1d03da2c276..036181772b1 100644 --- a/keyboards/wuque/serneity65/config.h +++ b/keyboards/wuque/serneity65/config.h @@ -22,11 +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 } } #define ENCODERS_CCW_KEY { { 5, 4 } } diff --git a/keyboards/wuque/serneity65/info.json b/keyboards/wuque/serneity65/info.json index d564e122368..744b112f70a 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 diff --git a/keyboards/wuque/serneity65/serneity65.c b/keyboards/wuque/serneity65/serneity65.c index 6a7c64157f8..1222722b4b2 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]) { diff --git a/keyboards/xenon/config.h b/keyboards/xenon/config.h index 4f44a9e9b07..61fda0e20a7 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 f0fd2f7bf84..5f74a9bbadd 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" }, diff --git a/keyboards/yandrstudio/nz67v2/config.h b/keyboards/yandrstudio/nz67v2/config.h index 5e36cf0b6b4..a3d9bb74c5b 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 033b05a3cba..ed063749761 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 3fc834909e3..e53141a7725 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 67bb7f657d6..85b39abe9b1 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 b14cd03b1b2..4ead2dc6f27 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 c82f1fd5ff8..6c0a2b165ed 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 4a03473d7d0..7f1153299c8 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 bf006e158d2..a6b946367f4 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 ae32db05bc3..5b0e667cc9c 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 76dd055e46c..19b8c31efb4 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 b805030bda1..3df5c25081b 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 1fbc570b6c1..7d062aef161 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 5aaf1891c4d..96656f70c8c 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 dfcd0e4f42b..4413c06defa 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": { diff --git a/keyboards/z12/config.h b/keyboards/z12/config.h index 6ee032f5c86..fef7fb59bd1 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 4f899bf7d68..8a88206df8b 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 3459ddb63cf..7c0453e3ae8 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 ab0e4472e53..875478ec109 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 8ae21a3b53f..97b0393aab6 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 84b50063693..f3519b94f49 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": {