diff options
author | Ryan <fauxpark@gmail.com> | 2023-02-26 09:45:12 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-26 09:45:12 +1100 |
commit | 7e0299117b389b1c7fcdfa2f20891ba2287ea771 (patch) | |
tree | 00bb5bb7b3b73a9de365d1839ba7d41240d439f1 /keyboards/handwired | |
parent | 314f6c1ddba09851b33e4f3b4bd43bdbc55f9628 (diff) |
Move encoder config to data driven (#19923)
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'keyboards/handwired')
51 files changed, 149 insertions, 134 deletions
diff --git a/keyboards/handwired/amigopunk/config.h b/keyboards/handwired/amigopunk/config.h index 78f8271f84..2cbbb3152a 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 2f98f2c755..e79911a676 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 497a2deb16..62c3144cc5 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 057931bb4e..5f7e673306 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 21f78e0645..23dbfa831c 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 9da51d5959..c607f21937 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 e69ceac331..a2a5455ab1 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 b56174caa2..1f56982b6d 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 6a5d485d7f..1fefa56fc6 100644 --- a/keyboards/handwired/daishi/config.h +++ b/keyboards/handwired/daishi/config.h @@ -34,10 +34,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 a28c885537..27671cc28a 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 067450ae0b..900a66bb8b 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 7be4ba0aa9..4e9dfdea8c 100644 --- a/keyboards/handwired/dc/mc/001/config.h +++ b/keyboards/handwired/dc/mc/001/config.h @@ -18,16 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 78c75f3713..852915569e 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 a9b3c12ef2..e46edef395 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 2b7a8cfc43..f7253711e4 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 8045d59c67..577b27b372 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 <http://www.gnu.org/licenses/>. //#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 3ddf407549..24fb55f5da 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 a942bd253d..2face5fbed 100644 --- a/keyboards/handwired/hnah108/config.h +++ b/keyboards/handwired/hnah108/config.h @@ -34,9 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 c9dcc020cc..116591fddf 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 97ba13cd6a..9ebec0ffef 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 408ecffc51..6068f33b9d 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 7743cd6cd6..6a7baeba33 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 <http://www.gnu.org/licenses/>. /* 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 ed635d0208..8a205c6794 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 d374143192..e96fba1db8 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 <http://www.gnu.org/licenses/>. + /* 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 <http://www.gnu.org/licenses/>. */ #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 891196f87b..5ab526ce67 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 5e94752e1b..a1b7295e32 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 0000000000..8078ee0481 --- /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 6edad3bc5c..c3767088c7 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 0000000000..a7ca847765 --- /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 97de836d04..57d303a983 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 da0221f474..a86091abfd 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 f18b0fab89..c10291a82a 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 <http://www.gnu.org/licenses/>. /* 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 887fc697af..2147a556c2 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 6618b9fa83..80b735d0d8 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 <http://www.gnu.org/licenses/>. /* 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 aba6fbd54d..2eef105756 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 45d0d0bb70..2f54bc0c4e 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 <http://www.gnu.org/licenses/>. #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 9b3f094e85..bef5225bcd 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 b802e4782a..77daa76c24 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 <http://www.gnu.org/licenses/>. #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 b5d0ebd1ba..60fe2886f5 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 d58a3cbfb4..7bfee265ab 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 <http://www.gnu.org/licenses/>. /* 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 675da09c9c..88da47f36b 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 e4856c4eec..c52610e9d3 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 <http://www.gnu.org/licenses/>. #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 4fcfeed921..dabab602dd 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 f3f3fb7e22..d10cb0bd8b 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 <http://www.gnu.org/licenses/>. #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 3ad29d36b8..bed70941bf 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 e93e70f569..227863aaa5 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 <http://www.gnu.org/licenses/>. #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 9b81dc18eb..0791e50ebf 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 cae5b7fc14..51ff0d3123 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 <http://www.gnu.org/licenses/>. #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 a7fb36c71e..7f60ae0edc 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 dff88fb7c6..1e6b532e2a 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 d95bbc9bca..b5d099b27a 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" |