Move matrix config to info.json, part 1 (#19985)
This commit is contained in:
@@ -17,37 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
/*
|
||||
* 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)
|
||||
*
|
||||
* The matrix description in the vendor-supplied JSON file for kbfirmware.com
|
||||
* had 9 columns:
|
||||
* { D0, D1, D2, D3, D5, D4, D6, D7, B4 }
|
||||
* and 12 rows:
|
||||
* { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 }
|
||||
* However, the row 6 was completely empty, and the pin F0 was not actually
|
||||
* routed anywhere on the PCB, therefore this row was removed to save some
|
||||
* resources (the EEPROM space for dynamic keymaps is especially scarce).
|
||||
*
|
||||
* After doing the above change, the matrix was transposed (rows and columns
|
||||
* were swapped), because a matrix with the COL2ROW layout can be scanned much
|
||||
* more efficiently than a matrix with the ROW2COL layout (depending on various
|
||||
* optimizations, the difference in scan rate can be over 2 times). Because of
|
||||
* this, the "columns" in the matrix layout now mostly correspond to physical
|
||||
* rows, and the "rows" have mostly vertical physical orientation.
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 }
|
||||
#define MATRIX_COL_PINS { B7, B3, B2, B1, B0, E6, F1, F4, F5, F6, F7 }
|
||||
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 20 /* 16 underglow LEDs, 4 top LEDs */
|
||||
|
@@ -6,6 +6,11 @@
|
||||
"vid": "0x6964",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["B7", "B3", "B2", "B1", "B0", "E6", "F1", "F4", "F5", "F6", "F7"],
|
||||
"rows": ["D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"]
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"backlight": {
|
||||
"pin": "B6",
|
||||
"breathing": true
|
||||
|
Reference in New Issue
Block a user