config.h (1424B)
1 /* 2 Copyright 2021 weteor 3 4 This program is free software: you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation, either version 2 of the License, or 7 (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #pragma once 19 20 /* key matrix size */ 21 #define MATRIX_ROWS 8 22 #define MATRIX_COLS 10 23 24 #define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) 25 #define MATRIX_COLS_PER_SIDE (MATRIX_COLS / 2) 26 27 /* 28 * Keyboard Matrix Assignments 29 * 30 * Change this to how you wired your keyboard 31 * COLS: AVR pins used for columns, left to right 32 * ROWS: AVR pins used for rows, top to bottom 33 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) 34 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) 35 * 36 */ 37 #define MATRIX_ROW_PINS_L { B0, B1, B2, B4} 38 #define MATRIX_COL_PINS_L { B3, E6, F7, B6, B5 } 39 40 #define MATRIX_ROW_PINS_R { P10, P11, P12, P05 } 41 #define MATRIX_COL_PINS_R { P06, P13, P14, P01, P00 } 42 43 44 /* COL2ROW, ROW2COL */ 45 #define DIODE_DIRECTION COL2ROW