Move encoder config to data driven (#19923)

Co-authored-by: Nick Brassel <nick@tzarc.org>
This commit is contained in:
Ryan
2023-02-26 09:45:12 +11:00
committed by GitHub
parent 314f6c1ddb
commit 7e0299117b
972 changed files with 2898 additions and 2569 deletions

View File

@@ -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

View File

@@ -13,6 +13,11 @@
"levels": 7,
"breathing": true
},
"encoder": {
"rotary": [
{"pin_a": "F6", "pin_b": "F5"}
]
},
"qmk_lufa_bootloader": {
"led": "B0"
},

View File

@@ -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 */

View File

@@ -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": {

View File

@@ -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

View File

@@ -8,6 +8,11 @@
"pid": "0x7C99",
"device_version": "0.0.1"
},
"encoder": {
"rotary": [
{"pin_a": "C7", "pin_b": "F7"}
]
},
"processor": "atmega32u4",
"bootloader": "caterina",
"layouts": {

View File

@@ -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

View File

@@ -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",

View File

@@ -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

View File

@@ -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": {

View File

@@ -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

View File

@@ -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"
}

View File

@@ -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

View File

@@ -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,

View File

@@ -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

View File

@@ -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": {

View File

@@ -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

View File

@@ -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": {

View File

@@ -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 }

View File

@@ -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": {

View File

@@ -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

View File

@@ -8,6 +8,11 @@
"pid": "0x0001",
"device_version": "0.0.1"
},
"encoder": {
"rotary": [
{"pin_a": "D0", "pin_b": "D1"}
]
},
"processor": "atmega328p",
"bootloader": "usbasploader",
"layouts": {

View File

@@ -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

View File

@@ -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": {

View File

@@ -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

View File

@@ -8,6 +8,13 @@
"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

View File

@@ -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
*

View File

@@ -6,6 +6,11 @@
"pid": "0x5368",
"device_version": "0.0.1"
},
"encoder": {
"rotary": [
{"pin_a": "B6", "pin_b": "B7"}
]
},
"backlight": {
"pin": "B0"
},

View File

@@ -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

View File

@@ -4,6 +4,11 @@
"pid": "0x5369",
"device_version": "0.0.2"
},
"encoder": {
"rotary": [
{"pin_a": "C15", "pin_b": "C14"}
]
},
"backlight": {
"pin": "A6",
"levels": 20,

View File

@@ -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

View File

@@ -8,6 +8,11 @@
"pid": "0x0108",
"device_version": "0.0.1"
},
"encoder": {
"rotary": [
{"pin_a": "GP18", "pin_b": "GP17"}
]
},
"bootmagic": {
"matrix": [1, 2]
},

View File

@@ -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 */

View File

@@ -7,6 +7,11 @@
"pid": "0x0004",
"vid": "0x4450"
},
"encoder": {
"rotary": [
{"pin_a": "B1", "pin_b": "B3"}
]
},
"processor": "atmega32u4",
"bootloader": "caterina",
"layouts": {

View File

@@ -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: */

View File

@@ -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": {

View File

@@ -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: */

View File

@@ -7,6 +7,11 @@
"pid": "0x0002",
"vid": "0x4450"
},
"encoder": {
"rotary": [
{"pin_a": "F1", "pin_b": "F0"}
]
},
"processor": "atmega32u4",
"bootloader": "caterina",
"layouts": {

View File

@@ -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

View File

@@ -25,6 +25,11 @@
"pid": "0x4564",
"vid": "0xA059"
},
"encoder": {
"rotary": [
{"pin_a": "D5", "pin_b": "B7", "resolution": 2}
]
},
"layouts": {
"LAYOUT_2u_single_space": {
"layout": [

View File

@@ -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 }

View File

@@ -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",

View File

@@ -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

View File

@@ -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": {

View File

@@ -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

View File

@@ -3,6 +3,11 @@
"pid": "0x0040",
"device_version": "0.0.2"
},
"encoder": {
"rotary": [
{"pin_a": "F5", "pin_b": "F4"}
]
},
"processor": "atmega32u4",
"bootloader": "caterina"
}

View File

@@ -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}

View File

@@ -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": {

View File

@@ -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 )

View File

@@ -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

Some files were not shown because too many files have changed in this diff Show More