Skip to content

Commit

Permalink
Move encoder config to data driven (#19923)
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Brassel <[email protected]>
  • Loading branch information
fauxpark and tzarc authored Feb 25, 2023
1 parent 314f6c1 commit 7e02991
Show file tree
Hide file tree
Showing 972 changed files with 2,898 additions and 2,569 deletions.
3 changes: 0 additions & 3 deletions keyboards/0xcb/1337/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions keyboards/0xcb/1337/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"levels": 7,
"breathing": true
},
"encoder": {
"rotary": [
{"pin_a": "F6", "pin_b": "F5"}
]
},
"qmk_lufa_bootloader": {
"led": "B0"
},
Expand Down
3 changes: 0 additions & 3 deletions keyboards/0xcb/static/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
5 changes: 5 additions & 0 deletions keyboards/0xcb/static/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 0 additions & 5 deletions keyboards/10bleoledhub/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 5 additions & 0 deletions keyboards/10bleoledhub/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"pid": "0x7C99",
"device_version": "0.0.1"
},
"encoder": {
"rotary": [
{"pin_a": "C7", "pin_b": "F7"}
]
},
"processor": "atmega32u4",
"bootloader": "caterina",
"layouts": {
Expand Down
3 changes: 0 additions & 3 deletions keyboards/1upkeyboards/pi40/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions keyboards/1upkeyboards/pi40/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 0 additions & 4 deletions keyboards/1upkeyboards/super16v2/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions keyboards/1upkeyboards/super16v2/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 0 additions & 3 deletions keyboards/25keys/aleth42/rev0/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions keyboards/25keys/aleth42/rev0/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 0 additions & 3 deletions keyboards/25keys/aleth42/rev1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions keyboards/25keys/aleth42/rev1/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 0 additions & 4 deletions keyboards/25keys/cassette42/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions keyboards/25keys/cassette42/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 0 additions & 5 deletions keyboards/2key2crawl/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions keyboards/2key2crawl/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 0 additions & 4 deletions keyboards/45_ats/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
5 changes: 5 additions & 0 deletions keyboards/45_ats/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 0 additions & 3 deletions keyboards/7c8/framework/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions keyboards/7c8/framework/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"pid": "0x0001",
"device_version": "0.0.1"
},
"encoder": {
"rotary": [
{"pin_a": "D0", "pin_b": "D1"}
]
},
"processor": "atmega328p",
"bootloader": "usbasploader",
"layouts": {
Expand Down
4 changes: 0 additions & 4 deletions keyboards/abacus/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions keyboards/abacus/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 0 additions & 4 deletions keyboards/abstract/ellipse/rev1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 10 additions & 3 deletions keyboards/abstract/ellipse/rev1/info.json
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 0 additions & 5 deletions keyboards/acheron/shark/alpha/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
5 changes: 5 additions & 0 deletions keyboards/acheron/shark/alpha/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"pid": "0x5368",
"device_version": "0.0.1"
},
"encoder": {
"rotary": [
{"pin_a": "B6", "pin_b": "B7"}
]
},
"backlight": {
"pin": "B0"
},
Expand Down
3 changes: 0 additions & 3 deletions keyboards/acheron/shark/beta/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 5 additions & 0 deletions keyboards/acheron/shark/beta/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"pid": "0x5369",
"device_version": "0.0.2"
},
"encoder": {
"rotary": [
{"pin_a": "C15", "pin_b": "C14"}
]
},
"backlight": {
"pin": "A6",
"levels": 20,
Expand Down
4 changes: 0 additions & 4 deletions keyboards/adafruit/macropad/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions keyboards/adafruit/macropad/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"pid": "0x0108",
"device_version": "0.0.1"
},
"encoder": {
"rotary": [
{"pin_a": "GP18", "pin_b": "GP17"}
]
},
"bootmagic": {
"matrix": [1, 2]
},
Expand Down
6 changes: 0 additions & 6 deletions keyboards/adpenrose/akemipad/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
5 changes: 5 additions & 0 deletions keyboards/adpenrose/akemipad/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"pid": "0x0004",
"vid": "0x4450"
},
"encoder": {
"rotary": [
{"pin_a": "B1", "pin_b": "B3"}
]
},
"processor": "atmega32u4",
"bootloader": "caterina",
"layouts": {
Expand Down
Loading

0 comments on commit 7e02991

Please sign in to comment.