فهرست منبع

Move encoder config to data driven (#19923)

Co-authored-by: Nick Brassel <nick@tzarc.org>
Ryan 3 سال پیش
والد
کامیت
7e0299117b
100فایلهای تغییر یافته به همراه293 افزوده شده و 260 حذف شده
  1. 0 3
      keyboards/0xcb/1337/config.h
  2. 5 0
      keyboards/0xcb/1337/info.json
  3. 0 3
      keyboards/0xcb/static/config.h
  4. 5 0
      keyboards/0xcb/static/info.json
  5. 0 5
      keyboards/10bleoledhub/config.h
  6. 5 0
      keyboards/10bleoledhub/info.json
  7. 0 3
      keyboards/1upkeyboards/pi40/config.h
  8. 5 0
      keyboards/1upkeyboards/pi40/info.json
  9. 0 4
      keyboards/1upkeyboards/super16v2/config.h
  10. 6 0
      keyboards/1upkeyboards/super16v2/info.json
  11. 0 3
      keyboards/25keys/aleth42/rev0/config.h
  12. 6 0
      keyboards/25keys/aleth42/rev0/info.json
  13. 0 3
      keyboards/25keys/aleth42/rev1/config.h
  14. 6 0
      keyboards/25keys/aleth42/rev1/info.json
  15. 0 4
      keyboards/25keys/cassette42/config.h
  16. 6 0
      keyboards/25keys/cassette42/info.json
  17. 0 5
      keyboards/2key2crawl/config.h
  18. 5 0
      keyboards/2key2crawl/info.json
  19. 0 4
      keyboards/45_ats/config.h
  20. 5 0
      keyboards/45_ats/info.json
  21. 0 3
      keyboards/7c8/framework/config.h
  22. 5 0
      keyboards/7c8/framework/info.json
  23. 0 4
      keyboards/abacus/config.h
  24. 5 0
      keyboards/abacus/info.json
  25. 0 4
      keyboards/abstract/ellipse/rev1/config.h
  26. 10 3
      keyboards/abstract/ellipse/rev1/info.json
  27. 0 5
      keyboards/acheron/shark/alpha/config.h
  28. 5 0
      keyboards/acheron/shark/alpha/info.json
  29. 0 3
      keyboards/acheron/shark/beta/config.h
  30. 5 0
      keyboards/acheron/shark/beta/info.json
  31. 0 4
      keyboards/adafruit/macropad/config.h
  32. 5 0
      keyboards/adafruit/macropad/info.json
  33. 0 6
      keyboards/adpenrose/akemipad/config.h
  34. 5 0
      keyboards/adpenrose/akemipad/info.json
  35. 0 6
      keyboards/adpenrose/kintsugi/config.h
  36. 5 0
      keyboards/adpenrose/kintsugi/info.json
  37. 0 6
      keyboards/adpenrose/obi/config.h
  38. 5 0
      keyboards/adpenrose/obi/info.json
  39. 0 5
      keyboards/aidansmithdotdev/fine40/config.h
  40. 5 0
      keyboards/aidansmithdotdev/fine40/info.json
  41. 0 6
      keyboards/aleblazer/zodiark/config.h
  42. 13 1
      keyboards/aleblazer/zodiark/info.json
  43. 0 5
      keyboards/ano/config.h
  44. 5 0
      keyboards/ano/info.json
  45. 0 5
      keyboards/aplyard/aplx6/rev2/config.h
  46. 5 0
      keyboards/aplyard/aplx6/rev2/info.json
  47. 0 22
      keyboards/arrayperipherals/1x4p1/config.h
  48. 5 0
      keyboards/arrayperipherals/1x4p1/info.json
  49. 0 5
      keyboards/atlantis/ak81_ve/config.h
  50. 5 0
      keyboards/atlantis/ak81_ve/info.json
  51. 4 11
      keyboards/atlantis/encoder_actions.c
  52. 0 7
      keyboards/atreyu/rev1/config.h
  53. 14 0
      keyboards/atreyu/rev1/info.json
  54. 0 5
      keyboards/atreyu/rev2/config.h
  55. 6 0
      keyboards/atreyu/rev2/info.json
  56. 0 4
      keyboards/avalanche/v2/config.h
  57. 5 0
      keyboards/avalanche/v2/info.json
  58. 0 4
      keyboards/avalanche/v3/config.h
  59. 5 0
      keyboards/avalanche/v3/info.json
  60. 0 4
      keyboards/avalanche/v4/config.h
  61. 5 0
      keyboards/avalanche/v4/info.json
  62. 1 12
      keyboards/bandominedoni/config.h
  63. 8 1
      keyboards/bandominedoni/info.json
  64. 0 4
      keyboards/basekeys/trifecta/config.h
  65. 7 0
      keyboards/basekeys/trifecta/info.json
  66. 0 3
      keyboards/basketweave/config.h
  67. 5 0
      keyboards/basketweave/info.json
  68. 0 4
      keyboards/bbrfkr/dynamis/config.h
  69. 5 0
      keyboards/bbrfkr/dynamis/info.json
  70. 0 6
      keyboards/bluebell/swoop/config.h
  71. 13 1
      keyboards/bluebell/swoop/info.json
  72. 0 3
      keyboards/bobpad/config.h
  73. 5 0
      keyboards/bobpad/info.json
  74. 0 4
      keyboards/bolsa/damapad/config.h
  75. 5 0
      keyboards/bolsa/damapad/info.json
  76. 0 6
      keyboards/boston/config.h
  77. 5 0
      keyboards/boston/info.json
  78. 0 3
      keyboards/boston_meetup/2019/config.h
  79. 5 0
      keyboards/boston_meetup/2019/info.json
  80. 0 4
      keyboards/cannonkeys/balance/config.h
  81. 5 0
      keyboards/cannonkeys/balance/info.json
  82. 0 3
      keyboards/cannonkeys/ortho75/config.h
  83. 5 0
      keyboards/cannonkeys/ortho75/info.json
  84. 0 5
      keyboards/cannonkeys/satisfaction75/config.h
  85. 5 0
      keyboards/cannonkeys/satisfaction75/info.json
  86. 0 6
      keyboards/capsunlocked/cu7/config.h
  87. 5 0
      keyboards/capsunlocked/cu7/info.json
  88. 0 5
      keyboards/checkerboards/phoenix45_ortho/config.h
  89. 5 0
      keyboards/checkerboards/phoenix45_ortho/info.json
  90. 0 5
      keyboards/checkerboards/quark/config.h
  91. 5 0
      keyboards/checkerboards/quark/info.json
  92. 0 4
      keyboards/checkerboards/quark_plus/config.h
  93. 8 0
      keyboards/checkerboards/quark_plus/info.json
  94. 0 4
      keyboards/checkerboards/quark_squared/config.h
  95. 5 0
      keyboards/checkerboards/quark_squared/info.json
  96. 0 3
      keyboards/checkerboards/snop60/config.h
  97. 5 0
      keyboards/checkerboards/snop60/info.json
  98. 0 5
      keyboards/cherrybstudio/cb65/config.h
  99. 0 4
      keyboards/chocofly/v1/config.h
  100. 5 0
      keyboards/chocofly/v1/info.json

+ 0 - 3
keyboards/0xcb/1337/config.h

@@ -19,9 +19,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 // 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

+ 5 - 0
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"
   },

+ 0 - 3
keyboards/0xcb/static/config.h

@@ -35,9 +35,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #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 */

+ 5 - 0
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": {

+ 0 - 5
keyboards/10bleoledhub/config.h

@@ -40,8 +40,3 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.*/
 
 
 #define OLED_FONT_H "./lib/glcdfont.c"
-
-#define ENCODERS_PAD_A { C7 }
-#define ENCODERS_PAD_B { F7 }
-
-#define ENCODER_RESOLUTION 4

+ 5 - 0
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": {

+ 0 - 3
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

+ 5 - 0
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",

+ 0 - 4
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
 

+ 6 - 0
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": {

+ 0 - 3
keyboards/25keys/aleth42/rev0/config.h

@@ -25,9 +25,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* 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

+ 6 - 0
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"
 }

+ 0 - 3
keyboards/25keys/aleth42/rev1/config.h

@@ -25,9 +25,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* 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

+ 6 - 0
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,

+ 0 - 4
keyboards/25keys/cassette42/config.h

@@ -17,10 +17,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #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

+ 6 - 0
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": {

+ 0 - 5
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
 

+ 5 - 0
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": {

+ 0 - 4
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 }

+ 5 - 0
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": {

+ 0 - 3
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
 

+ 5 - 0
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": {

+ 0 - 4
keyboards/abacus/config.h

@@ -33,10 +33,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #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

+ 5 - 0
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": {

+ 0 - 4
keyboards/abstract/ellipse/rev1/config.h

@@ -64,7 +64,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 { B2, B3, D5 }
-#define ENCODERS_PAD_B { B1, B7, B4 }
-#define ENCODER_RESOLUTION 2

+ 10 - 3
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

+ 0 - 5
keyboards/acheron/shark/alpha/config.h

@@ -17,11 +17,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #pragma once
 
-
-/* encoder pads */
-#define ENCODERS_PAD_A { B6 }
-#define ENCODERS_PAD_B { B7 }
-
 /*
  * Keyboard Matrix Assignments
  *

+ 5 - 0
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"
   },

+ 0 - 3
keyboards/acheron/shark/beta/config.h

@@ -49,7 +49,4 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #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

+ 5 - 0
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,

+ 0 - 4
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

+ 5 - 0
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]
     },

+ 0 - 6
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 */

+ 5 - 0
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": {

+ 0 - 6
keyboards/adpenrose/kintsugi/config.h

@@ -34,12 +34,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* 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: */

+ 5 - 0
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": {

+ 0 - 6
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: */

+ 5 - 0
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": {

+ 0 - 5
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

+ 5 - 0
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": [

+ 0 - 6
keyboards/aleblazer/zodiark/config.h

@@ -20,12 +20,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #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 }

+ 13 - 1
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",

+ 0 - 5
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

+ 5 - 0
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": {

+ 0 - 5
keyboards/aplyard/aplx6/rev2/config.h

@@ -27,9 +27,4 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #define TAPPING_TERM 200
 
-/* Encoder */
-#define ENCODERS_PAD_A { F5 }
-#define ENCODERS_PAD_B { F4 }
-#define ENCODER_RESOLUTION 4
-
 #define TAP_CODE_DELAY 50

+ 5 - 0
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"
 }

+ 0 - 22
keyboards/arrayperipherals/1x4p1/config.h

@@ -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 <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/* rotary encoder*/
-#define ENCODERS_PAD_A {F0}
-#define ENCODERS_PAD_B {F1}

+ 5 - 0
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": {

+ 0 - 5
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 )
 

+ 5 - 0
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

+ 4 - 11
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) {

+ 0 - 7
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
  

+ 14 - 0
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": {

+ 0 - 5
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
  

+ 6 - 0
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": {

+ 0 - 4
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

+ 5 - 0
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"
     },

+ 0 - 4
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

+ 5 - 0
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"
     },

+ 0 - 4
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

+ 5 - 0
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"
     },

+ 1 - 12
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

+ 8 - 1
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",

+ 0 - 4
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
 

+ 7 - 0
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]
     },

+ 0 - 3
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

+ 5 - 0
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": {

+ 0 - 4
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

+ 5 - 0
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": {

+ 0 - 6
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

+ 13 - 1
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",

+ 0 - 3
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 }

+ 5 - 0
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",

+ 0 - 4
keyboards/bolsa/damapad/config.h

@@ -26,10 +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 { B2 }
-#define ENCODERS_PAD_B { B3 }
-#define ENCODER_RESOLUTION 2
-
 /*
  * Feature disable options
  *  These options are also useful to firmware size reduction.

+ 5 - 0
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": {

+ 0 - 6
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
 
 /*

+ 5 - 0
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,

+ 0 - 3
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

+ 5 - 0
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",

+ 0 - 4
keyboards/cannonkeys/balance/config.h

@@ -26,10 +26,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* 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

+ 5 - 0
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",

+ 0 - 3
keyboards/cannonkeys/ortho75/config.h

@@ -24,9 +24,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #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 */

+ 5 - 0
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,

+ 0 - 5
keyboards/cannonkeys/satisfaction75/config.h

@@ -27,11 +27,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #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

+ 5 - 0
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

+ 0 - 6
keyboards/capsunlocked/cu7/config.h

@@ -27,12 +27,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *                  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 }
 

+ 5 - 0
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": {

+ 0 - 5
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

+ 5 - 0
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": {

+ 0 - 5
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

+ 5 - 0
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"],

+ 0 - 4
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

+ 8 - 0
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,

+ 0 - 4
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}

+ 5 - 0
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": {

+ 0 - 3
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}

+ 5 - 0
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,

+ 0 - 5
keyboards/cherrybstudio/cb65/config.h

@@ -28,11 +28,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #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
 

+ 0 - 4
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

+ 5 - 0
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 نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است