Migrate DIRECT_PINS to data driven (#19826)

This commit is contained in:
Ryan
2023-02-14 18:39:41 +11:00
committed by GitHub
parent 0b796b91a3
commit 2cdf99ae95
158 changed files with 560 additions and 1197 deletions

View File

@ -18,16 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// clang-format off
/* key matrix size */
#define MATRIX_ROWS 3
#define MATRIX_COLS 3
/* Keyboard Matrix Assignments */
#define DIRECT_PINS { \
{ D2, D4, F4 }, \
{ D7, B1, B3 }, \
{ E6, B4, B2 } \
}
#define TAP_CODE_DELAY 10
#define ENCODER_RESOLUTION 4
#define ENCODERS_PAD_A { F6 }

View File

@ -10,6 +10,13 @@
},
"processor": "atmega32u4",
"bootloader": "qmk-dfu",
"matrix_pins": {
"direct": [
["D2", "D4", "F4"],
["D7", "B1", "B3"],
["E6", "B4", "B2"]
]
},
"layouts": {
"LAYOUT": {
"layout": [

View File

@ -16,27 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 4
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
/* Keyboard Matrix Assignments */
#define DIRECT_PINS { \
{ E6, D7, B1, B3 }, \
{ B5, B4, B2, B6 } \
}
#define RGB_DI_PIN D3 // LED data pin on controller
#define RGBLED_NUM 4 // Number of LEDs connected

View File

@ -10,6 +10,12 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
"matrix_pins": {
"direct": [
["E6", "D7", "B1", "B3"],
["B5", "B4", "B2", "B6"]
]
},
"layouts": {
"LAYOUT": {
"layout": [

View File

@ -15,18 +15,6 @@
*/
#pragma once
/* matrix size */
#define MATRIX_ROWS 1
#define MATRIX_COLS 1
/*
* Keyboard Matrix Assignments
*
* On this board we have direct connection: no diodes.
*/
#define DIRECT_PINS {{ B0 }}
#define RGBLED_NUM 1
#define RGB_DI_PIN B2

View File

@ -8,6 +8,11 @@
"pid": "0x0001",
"device_version": "0.0.1"
},
"matrix_pins": {
"direct": [
["B0"]
]
},
"layouts": {
"LAYOUT_ortho_1x1": {
"layout": [

View File

@ -17,13 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
/* key matrix size */
#define MATRIX_ROWS 1
#define MATRIX_COLS 6
#define DIRECT_PINS {{ B4, F6, F5, F4, B5, F7 }}
#define ENCODERS_PAD_A { B6, B3 }
#define ENCODERS_PAD_B { B2, B1 }
#define ENCODER_RESOLUTION 4

View File

@ -10,6 +10,11 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
"matrix_pins": {
"direct": [
["B4", "F6", "F5", "F4", "B5", "F7"]
]
},
"layouts": {
"LAYOUT": {
"layout": [{"x":0.5, "y":0.75}, {"x":2.5, "y":0.75}, {"x":0, "y":1.75}, {"x":1, "y":1.75}, {"x":2, "y":1.75}, {"x":3, "y":1.75}]

View File

@ -17,30 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
/* key matrix size */
#define MATRIX_ROWS 1
#define MATRIX_COLS 4
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
// #define MATRIX_ROW_PINS { B0 } // B0 equivalents the ground pin
// #define MATRIX_COL_PINS { E6, D7, C6, D4 }
#define DIRECT_PINS { \
{ E6, D7, C6, D4 } \
}
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_LED_COUNT 2
#undef BACKLIGHT_PIN
#define BACKLIGHT_PINS { F6, F7 }

View File

@ -10,6 +10,11 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
"matrix_pins": {
"direct": [
["E6", "D7", "C6", "D4"]
]
},
"layouts": {
"LAYOUT": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}]

View File

@ -17,29 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 4
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
* NO_DIODE = switches are directly connected to AVR pins
*
*/
// #define MATRIX_ROW_PINS { D0, D5 }
// #define MATRIX_COL_PINS { F1, F0, B0 }
#define DIRECT_PINS { \
{ F4, F5, F6, F7 }, \
{ D1, D0, D4, C6 }, \
}
/* ws2812 RGB LED */
#define RGB_DI_PIN D3
# define RGBLIGHT_EFFECT_BREATHING

View File

@ -10,6 +10,12 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
"matrix_pins": {
"direct": [
["F4", "F5", "F6", "F7"],
["D1", "D0", "D4", "C6"]
]
},
"layouts": {
"LAYOUT_ortho_2x4": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}]

View File

@ -16,18 +16,6 @@
#pragma once
/* key matrix size */
#define MATRIX_ROWS 3
#define MATRIX_COLS 3
/* Keyboard Matrix Assignments */
#define DIRECT_PINS { \
{ F4, F5, F6 }, \
{ F7, B1, B3 }, \
{ B2, B6, B5 } \
}
// #define RGB_DI_PIN E2
// #ifdef RGB_DI_PIN
// #define RGBLED_NUM 16

View File

@ -10,6 +10,13 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
"matrix_pins": {
"direct": [
["F4", "F5", "F6"],
["F7", "B1", "B3"],
["B2", "B6", "B5"]
]
},
"layouts": {
"LAYOUT_ortho_3x3": {
"layout": [

View File

@ -17,29 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 3
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define DIRECT_PINS { \
{ D4, C6, D7 }, \
{ E6, B4, B5 } \
}
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/* Backlight */
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 6

View File

@ -10,6 +10,12 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
"matrix_pins": {
"direct": [
["D4", "C6", "D7"],
["E6", "B4", "B5"]
]
},
"community_layouts": ["ortho_2x3"],
"layouts": {
"LAYOUT_ortho_2x3": {

View File

@ -1,23 +1,11 @@
#pragma once
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 4
/* key matrix pins */
#define DIRECT_PINS { { F4, F5, F6, F7 }, { B1, B3, B2, B6 } }
#define BACKLIGHT_LED_COUNT 8
#undef BACKLIGHT_PIN
#define BACKLIGHT_PINS { D1, D0, D4, C6, D7, E6, B4, B5 }

View File

@ -9,6 +9,12 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
"matrix_pins": {
"direct": [
["F4", "F5", "F6", "F7"],
["B1", "B3", "B2", "B6"]
]
},
"layouts": {
"LAYOUT": {
"layout": [

View File

@ -16,36 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 5
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
* NO_DIODE = switches are directly connected to AVR pins
*
*/
#define DIRECT_PINS { \
{ C6, D2, F7, B2, F4 }, \
{ D7, D0, F6, B3, F5 }, \
{ E6, D4, D3, B1, B6 }, \
{ B4, B5, NO_PIN, NO_PIN, NO_PIN } \
}
#define DIRECT_PINS_RIGHT { \
{ F4, B2, F7, D2, C6 }, \
{ F5, B3, F6, D0, D7 }, \
{ B6, B1, D3, D4, E6 }, \
{ B5, B4, NO_PIN, NO_PIN, NO_PIN } \
}
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE

View File

@ -10,6 +10,26 @@
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"matrix_pins": {
"direct": [
["C6", "D2", "F7", "B2", "F4"],
["D7", "D0", "F6", "B3", "F5"],
["E6", "D4", "D3", "B1", "B6"],
["B4", "B5", null, null, null]
]
},
"split": {
"matrix_pins": {
"right": {
"direct": [
["F4", "B2", "F7", "D2", "C6"],
["F5", "B3", "F6", "D0", "D7"],
["B6", "B1", "D3", "D4", "E6"],
["B5", "B4", null, null, null]
]
}
}
},
"community_layouts": ["split_3x5_2"],
"layouts": {
"LAYOUT_split_3x5_2": {

View File

@ -16,22 +16,6 @@
#pragma once
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 3
/* Keyboard Matrix Assignments */
// clang-format off
#define DIRECT_PINS { \
{ NO_PIN, NO_PIN, GP0 }, \
{ GP1, GP2, GP3 }, \
{ GP4, GP5, GP6 }, \
{ GP7, GP8, GP9 }, \
{ GP10, GP11, GP12 } \
}
// clang-format on
/* OLED SPI Defines */
#define OLED_DISPLAY_128X64
#define OLED_IC OLED_IC_SH1106

View File

@ -10,6 +10,15 @@
},
"processor": "RP2040",
"bootloader": "rp2040",
"matrix_pins": {
"direct": [
[null, null, "GP0"],
["GP1", "GP2", "GP3"],
["GP4", "GP5", "GP6"],
["GP7", "GP8", "GP9"],
["GP10", "GP11", "GP12"]
]
},
"layouts": {
"LAYOUT": {
"layout": [

View File

@ -3,17 +3,6 @@
#pragma once
/* key matrix size */
#define MATRIX_ROWS 1
#define MATRIX_COLS 1
/* Keyboard Matrix Assignments */
// clang-format off
#define DIRECT_PINS { \
{ GP26 } \
}
#define RGBLIGHT_DEFAULT_MODE 9
/* Double tap reset button to enter bootloader */

View File

@ -44,6 +44,11 @@
}
]
},
"matrix_pins": {
"direct": [
["GP26"]
]
},
"layouts": {
"LAYOUT_k1": {
"layout": [

View File

@ -17,27 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 4
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
* NO_DIODE = switches are directly connected to AVR pins
*
*/
#define DIRECT_PINS { \
{ D4, F6, B5, E6 }, \
{ F5, F7, B4, C6 } \
}
#define BACKLIGHT_PIN D7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3

View File

@ -10,6 +10,12 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
"matrix_pins": {
"direct": [
["D4", "F6", "B5", "E6"],
["F5", "F7", "B4", "C6"]
]
},
"layouts": {
"LAYOUT_ortho_2x4": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}]

View File

@ -17,16 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
/* key matrix size */
#define MATRIX_ROWS 1
#define MATRIX_COLS 5
#define DIRECT_PINS { \
{ C7, B7, D6, F5, F7} \
}
/* rotary encoder*/
#define ENCODERS_PAD_A {F0}
#define ENCODERS_PAD_B {F1}

View File

@ -10,6 +10,11 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
"matrix_pins": {
"direct": [
["C7", "B7", "D6", "F5", "F7"]
]
},
"layouts": {
"LAYOUT_ortho_1x5": {
"layout": [

View File

@ -11,23 +11,5 @@
#define SERIAL_USART_TX_PIN GP0
#define SERIAL_USART_RX_PIN GP1
/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 6
#define DIRECT_PINS { \
{ GP5, GP4, GP11, GP15, GP3, GP2}, \
{ GP22, GP20, GP10, GP14, GP9, GP8}, \
{ GP21, GP19, GP6, GP7, GP13, GP12}, \
{ GP17, GP18, GP16, NO_PIN, NO_PIN, NO_PIN} \
}
#define DIRECT_PINS_RIGHT { \
{ GP22, GP21, GP2, GP5, GP8, GP11}, \
{ GP20, GP19, GP3, GP6, GP9, GP12}, \
{ GP18, GP17, GP4, GP7, GP10, GP13}, \
{ GP15, GP14, GP16, NO_PIN, NO_PIN, NO_PIN} \
}
#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 5

View File

@ -18,8 +18,26 @@
"pid": "0x0001",
"vid": "0xBEEB"
},
"matrix_pins": {
"direct": [
["GP5", "GP4", "GP11", "GP15", "GP3", "GP2"],
["GP22", "GP20", "GP10", "GP14", "GP9", "GP8"],
["GP21", "GP19", "GP6", "GP7", "GP13", "GP12"],
["GP17", "GP18", "GP16", null, null, null]
]
},
"split": {
"enabled": true
"enabled": true,
"matrix_pins": {
"right": {
"direct": [
["GP22", "GP21", "GP2", "GP5", "GP8", "GP11"],
["GP20", "GP19", "GP3", "GP6", "GP9", "GP12"],
["GP18", "GP17", "GP4", "GP7", "GP10", "GP13"],
["GP15", "GP14", "GP16", null, null, null]
]
}
}
},
"community_layouts": ["split_3x6_3"],
"layouts": {

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