Move miscellaneous defines to data driven (#21382)

This commit is contained in:
Ryan
2023-07-03 07:40:13 +10:00
committed by GitHub
parent 9ab16e62f7
commit 023035f462
69 changed files with 103 additions and 236 deletions

View File

@@ -8,6 +8,11 @@
"pid": "0x4A13",
"device_version": "1.0.0"
},
"matrix_pins": {
"cols": ["GP2", "GP3", "GP4", "GP5", "GP6", "GP7"],
"rows": ["GP8", "GP9", "GP10", "GP11", "GP12"]
},
"diode_direction": "COL2ROW",
"ws2812": {
"pin": "GP15",
"driver": "vendor"
@@ -15,6 +20,22 @@
"rgb_matrix": {
"driver": "WS2812"
},
"encoder": {
"rotary": [
{"pin_a": "GP16", "pin_b": "GP17"},
{"pin_a": "GP14", "pin_b": "GP13"}
]
},
"split": {
"encoder": {
"right": {
"rotary": [
{"pin_a": "GP14", "pin_b": "GP13"},
{"pin_a": "GP16", "pin_b": "GP17"}
]
}
}
},
"processor": "RP2040",
"bootloader": "rp2040",
"layouts": {

View File

@@ -3,13 +3,6 @@
#pragma once
// Electrical Wiring Stuff
#define MATRIX_ROW_PINS \
{ GP8, GP9, GP10, GP11, GP12 }
#define MATRIX_COL_PINS \
{ GP2, GP3, GP4, GP5, GP6, GP7 }
#define DIODE_DIRECTION COL2ROW
// Split Keyboard Stuff
#define EE_HANDS // Sets the keyboards handedness using EEPROM
#define SERIAL_USART_FULL_DUPLEX // Use full duplex communication (TRRS)
@@ -24,19 +17,3 @@
{ 37, 37 } // 37 LEDs on each side
#endif
/* Rotary Encoders Definition */
// Indexing goes from physical leftmost to rightmost
// 0: left-half left | 1: left-half right | 2: right-half left | 3: right-half right
#ifdef ENCODER_ENABLE
# define ENCODERS_PAD_A \
{ GP16, GP14 }
# define ENCODERS_PAD_B \
{ GP17, GP13 }
# define ENCODERS_PAD_A_RIGHT \
{ GP14, GP16 }
# define ENCODERS_PAD_B_RIGHT \
{ GP13, GP17 }
#endif