diff --git a/keyboards/0xcb/1337/config.h b/keyboards/0xcb/1337/config.h index b7cbf3b757..a247d1b367 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 95170ee873..d34d7166bf 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 0f517163e5..f77002e8ab 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 b6e5f01b27..a18bd7b313 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 0fcd15894f..5943564661 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 84dea67c3a..dd106a74a5 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 6d19ace806..dfed1e4e6f 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 0f8bee6efe..42c0bc7b12 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 f71b6b7942..04f5fdd979 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 7886ce228e..13e2c55fa5 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 b84cc698e4..eb8bd97b59 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 acb5cc5855..18023c847e 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 afce07dbc9..e0799e65a1 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 7d3baad862..9d70daf01f 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 c57f66da5d..686eea8fc7 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 280733feb9..f791a83e48 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 6025ba1d01..67a1b48157 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 a50d646244..e4ab7f79a9 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 734bc8d737..fcf2f8ea44 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 530c2f3031..0bf42f9a75 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 3cc7d44f1b..ba7016ab34 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 a9871f7745..ca440e9a76 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 0fff005257..2e28b792a1 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 17cd35aba8..132187db26 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 46e0cacce4..f7932863e9 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 fe1939d2b6..230e286c5d 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 dba9b3f41d..9c36ac3a1f 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 5b235cc387..d6b5dfcd0f 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 161b9b1558..8cfc57b9d5 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 0dcb286e97..73025df6c4 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 6f2c08c5e8..c493c487e3 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 4986a5974f..75c859adb1 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 41156ecf3d..47fcf429ac 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 2e3f785164..9b5a8d6ef6 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 c4007613e9..5ffeb86837 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 8c6258f020..a26c65b42a 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 c577a4a727..c9f606999e 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 544b4fc5d4..c0c1b73c64 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 e7799e2b0b..a39d7fef7d 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 c2e1afd84c..c41557a920 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 2028f9bda3..148e9a7672 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 f8d2300fd9..8211117625 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 be3a49fe33..df6d076d5c 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 94e1f828cc..19d53a9ce1 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 1e109c7001..f2793935cb 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 314d52dc8d..114894a714 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 b70680e4f5..0000000000 --- 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 b124b20334..2cc838bc92 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 4a7898350d..7379856a4f 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 052492b7ce..0269bd1e27 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 b41a248a83..5bfba6d99f 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 67a4d1d05d..99eb2c21e6 100644 --- a/keyboards/atreyu/rev1/config.h +++ b/keyboards/atreyu/rev1/config.h @@ -30,13 +30,6 @@ #define MATRIX_ROW_PINS { D7, E6, B4, B5, F6, F7, B1, B3, B6, B2 } #define MATRIX_COL_PINS { C6, D4, D0, D1, D2, D3 } -/* encoder support */ -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } -#define ENCODERS_PAD_A_RIGHT { F4 } -#define ENCODERS_PAD_B_RIGHT { F5 } -#define ENCODER_RESOLUTION 4 - /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreyu/rev1/info.json b/keyboards/atreyu/rev1/info.json index a9522acd5d..6d191d0635 100644 --- a/keyboards/atreyu/rev1/info.json +++ b/keyboards/atreyu/rev1/info.json @@ -8,6 +8,20 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + }, + "split": { + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + } + } + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/atreyu/rev2/config.h b/keyboards/atreyu/rev2/config.h index baaef0800c..de63cf3bd1 100644 --- a/keyboards/atreyu/rev2/config.h +++ b/keyboards/atreyu/rev2/config.h @@ -30,11 +30,6 @@ #define MATRIX_ROW_PINS { D7, E6, B4, B5, F6, F7, B1, B3, B6, B2 } #define MATRIX_COL_PINS { F4, F5, C6, D4, D2, D3 } -/* encoder support */ -#define ENCODERS_PAD_A { D5, D5 } -#define ENCODERS_PAD_B { B7, C7 } -#define ENCODER_RESOLUTION 4 - /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreyu/rev2/info.json b/keyboards/atreyu/rev2/info.json index 5c74a40c92..a890b8d271 100644 --- a/keyboards/atreyu/rev2/info.json +++ b/keyboards/atreyu/rev2/info.json @@ -8,6 +8,12 @@ "pid": "0x0001", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "D5", "pin_b": "B7"}, + {"pin_a": "D5", "pin_b": "C7"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/avalanche/v2/config.h b/keyboards/avalanche/v2/config.h index 5aee77c04d..3978f581e1 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 d6b770ee48..7105fc1787 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 a0e5af4531..efe0c27932 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 3a0b43fb71..70ffcc9efc 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 1009ab6e33..86dff022e0 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 fdb71ce0e8..5b31b5ca11 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 947f60b0f6..7a25216afd 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 79961fa770..d0d470a4e4 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 e21dcdd3fe..c06395545d 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 6d7cf723a8..8743e3aad1 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 dca609a170..2c3f6f97f2 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 d976a2811c..3ef505854e 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 516f749ff6..28c21cb9f5 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 5574bf6da4..4f256e8ac5 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 ece3ed5928..de47d3a071 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 320590894b..49dcc857e9 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 587a0a0d5d..1b4ca326d9 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 58f724fbbe..43e614dbad 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 444f0de0e7..9342bd0283 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 3db2ab2e11..72e432c871 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 6dddf137f7..1c175166ee 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 40cc21008c..1d8e39f29d 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 624d8fd1d0..00e8648df8 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 5ce2375062..22f54c3472 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 5ba99322ff..5d93b09a27 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 13eb96a62f..b9844e5295 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 021c4f38b6..5246778d13 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 31465c47c0..751eeb5297 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 c2c20e1771..ac9548dd27 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 dd157defba..9bf8459b1a 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 93db7814f2..cdc031b93b 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 64416b0264..ebd7b6d491 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 3f1b16129a..8c11a3ccf7 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 ed976903e8..23f6b024fa 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 c064c8569a..42ccb06300 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 f7016ac048..0f7f3b0f44 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 b44a42406b..69781c0fa2 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 6c40827e74..49ab42adcb 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 1715a1101b..85bed28b45 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 699300a3a6..de8496a798 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 92f1cd72e8..5015355170 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 b3e9645465..0c543a7c85 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 6bf9dba1e5..b298fec8dc 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 aa7e280ce4..a1886ffafa 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 f0b5f7b21d..ab4fde45e6 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 506347a4d5..c4307fe988 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 b847eb42d7..908eb0d188 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 5ebf94953e..22e8f265f6 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 787b4dcc19..5bcb91e822 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 66b2e37845..b72287fc2e 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 0461020f09..b57e29acde 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 59e427a0b0..b9bb2fce7b 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 fbed9fefa5..cdd9d713a6 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 70ba6154dd..b309fa210b 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 b73b5bb9ff..031952a0b3 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 37a3146ee3..0eebbabb6d 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 8e51462983..eb4fd4bbf6 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 10b681f60c..44842c0e16 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 d33e3e1f78..840d8e7ca5 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 eae6ee7415..20d5ad2ff4 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 d73f5b1823..633cbec155 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 824edd4277..1ea89ad92a 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 5f6113bc68..c5e7661c65 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 3ff1d77904..aaab705432 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 f034eab579..f152f723fe 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 6ba57648cb..45b83c512a 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 41efbbb6b5..7da6e3f1bf 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 1aed397e38..ee1d19e7d6 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 41efbbb6b5..7da6e3f1bf 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 69dc1479a4..c8d5803718 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 b430a301d7..3708284700 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 5558cac96f..e976a6a155 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 bf501e83ab..d8a6d95c9b 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 992960c5a2..4434ba95d7 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 687bb7a294..e28d974b78 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 c7206e9d97..589c8c5089 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 48326e7f22..4d5aa33be9 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 735a5cf16a..8301a03813 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 47255ed3ae..1e908ea029 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 2e5148236e..ff5101f8ea 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 5f30b97812..aa066fe393 100644 --- a/keyboards/doio/kb16/rev1/config.h +++ b/keyboards/doio/kb16/rev1/config.h @@ -31,10 +31,6 @@ /* Use the custom font */ #define OLED_FONT_H "./lib/glcdfont.c" -/* Encoder pins */ -#define ENCODERS_PAD_A { F7, C7, D7 } -#define ENCODERS_PAD_B { E6, C6, D6 } - #ifdef RGB_MATRIX_ENABLE /* RGB Matrix config */ #define RGB_DI_PIN F6 diff --git a/keyboards/doio/kb16/rev1/info.json b/keyboards/doio/kb16/rev1/info.json index d8bf6e8b73..d0acdedfb9 100644 --- a/keyboards/doio/kb16/rev1/info.json +++ b/keyboards/doio/kb16/rev1/info.json @@ -8,6 +8,13 @@ "pid": "0x1601", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "F7", "pin_b": "E6"}, + {"pin_a": "C7", "pin_b": "C6"}, + {"pin_a": "D7", "pin_b": "D6"} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/doio/kb16/rev2/config.h b/keyboards/doio/kb16/rev2/config.h index 29367f26e8..e7e2791ac8 100644 --- a/keyboards/doio/kb16/rev2/config.h +++ b/keyboards/doio/kb16/rev2/config.h @@ -38,10 +38,6 @@ #define OLED_FONT_H "./lib/glcdfont.c" #endif -/* Encoder pins */ -#define ENCODERS_PAD_A { B5, A1, A3 } -#define ENCODERS_PAD_B { B6, A2, A4 } - #ifdef RGB_MATRIX_ENABLE /* RGB Matrix config */ #define RGB_DI_PIN A10 diff --git a/keyboards/doio/kb16/rev2/info.json b/keyboards/doio/kb16/rev2/info.json index 28aa77b127..8b5eeb45c2 100644 --- a/keyboards/doio/kb16/rev2/info.json +++ b/keyboards/doio/kb16/rev2/info.json @@ -8,6 +8,13 @@ "pid": "0x1601", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B6"}, + {"pin_a": "A1", "pin_b": "A2"}, + {"pin_a": "A3", "pin_b": "A4"} + ] + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/doio/kb30/config.h b/keyboards/doio/kb30/config.h index 42e521c18d..866bd3e1d9 100644 --- a/keyboards/doio/kb30/config.h +++ b/keyboards/doio/kb30/config.h @@ -27,12 +27,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key encoders pins*/ -#define ENCODERS_PAD_A { B5 , A1 , A3 } -#define ENCODERS_PAD_B { B6 , A2 , A4 } -#define ENCODER_RESOLUTIONS \ - { 4, 4, 2 } - // #define QMK_KEYS_PER_SCAN 12 /* OLED */ diff --git a/keyboards/doio/kb30/info.json b/keyboards/doio/kb30/info.json index 47ed0c3f42..9fe8e83185 100644 --- a/keyboards/doio/kb30/info.json +++ b/keyboards/doio/kb30/info.json @@ -8,6 +8,13 @@ "pid": "0x3001", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B6"}, + {"pin_a": "A1", "pin_b": "A2"}, + {"pin_a": "A3", "pin_b": "A4", "resolution": 2} + ] + }, "processor": "STM32F103", "bootloader": "stm32duino", "layouts": { diff --git a/keyboards/doio/kb38/config.h b/keyboards/doio/kb38/config.h index 416219d5c7..740f1baea7 100644 --- a/keyboards/doio/kb38/config.h +++ b/keyboards/doio/kb38/config.h @@ -16,11 +16,6 @@ #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON #define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS -#define ENCODERS_PAD_A { C7, F7, D6 } -#define ENCODERS_PAD_B { C6, E6, D7 } -#define ENCODER_RESOLUTIONS { 4, 4, 2 } - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/doio/kb38/info.json b/keyboards/doio/kb38/info.json index 9d75ada43e..227511295c 100644 --- a/keyboards/doio/kb38/info.json +++ b/keyboards/doio/kb38/info.json @@ -25,6 +25,13 @@ "pid": "0x0000", "vid": "0xFEED" }, + "encoder": { + "rotary": [ + {"pin_a": "C7", "pin_b": "C6"}, + {"pin_a": "F7", "pin_b": "E6"}, + {"pin_a": "D6", "pin_b": "D7", "resolution": 2} + ] + }, "rgb_matrix": { "driver": "WS2812", "layout": [ diff --git a/keyboards/doodboard/duckboard/config.h b/keyboards/doodboard/duckboard/config.h index bce35cc22e..d4617a8786 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 52915ac222..f2ee7bb80a 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 dae2e08652..d4617a8786 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 6483a4b129..b2de93f477 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 8ea9dd48d5..63c16c1c71 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 310fa97659..83b071e98b 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 f941fa5d05..e701420bee 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 8b39ae5ba1..c847a45650 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 6e384d1162..e13ed8af9d 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 20f2edd54f..49a56a2786 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 d063077004..5700fad7d2 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 02d1e1e4c3..b9f9246701 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 fe1f5e44aa..da4fb5b410 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 1b96eab73f..3fe1a8b4f8 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 d302a078d5..2e605318d1 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 160b696fe2..cf6adb3801 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 10e50bbb99..92dd62ea17 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 a12eecb8dc..8b6294af5f 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 5eb5ae961c..cdc8d665dc 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 dc01df1c32..437d009dc8 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 421d1f7a1d..09adca69e5 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 f7da467561..8a3d273415 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 9a7be81260..dce94fd8d4 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 f7da467561..e51452897a 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 4300694b82..57fac8225f 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 a20f41682e..7576fe2aa5 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 9f6a109f84..82f308f651 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 db02b1aead..6cef09807b 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 a989bf9baf..2c00ba8eef 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 31f44f74fe..acdbe2c590 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 4a907fc8ec..87e057133d 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 7043ccc98d..f1a4bc3f16 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 bd80723d92..87e057133d 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 1f54c23d8e..413e0ac379 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 d93f882fb0..87e057133d 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 246473ec3d..7f3d04417c 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 e4f37ae1c9..f4954fcd11 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 e62de3f54f..d8b388c331 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 4aa733a06a..979424c64a 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