]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/planck/ez/config.h
142382dab1ebf9e063baa33abfab3f4652f1a611
[qmk_firmware.git] / keyboards / planck / ez / config.h
1 /*
2  * Copyright 2018 Jack Humbert <jack.humb@gmail.com>
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 /* USB Device descriptor parameter */
21 #define DEVICE_VER 0x0000
22
23 #undef MATRIX_ROWS
24 #undef MATRIX_COLS
25 /* key matrix size */
26 #define MATRIX_ROWS 8
27 #define MATRIX_COLS 6
28
29 /*
30  * Keyboard Matrix Assignments
31  *
32  * Change this to how you wired your keyboard
33  * COLS: AVR pins used for columns, left to right
34  * ROWS: AVR pins used for rows, top to bottom
35  * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
36  *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
37  *
38 */
39
40 #undef MATRIX_ROW_PINS
41 #undef MATRIX_COL_PINS
42
43 #define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2 }
44 #define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 }
45
46 #define NUMBER_OF_ENCODERS 1
47 #define ENCODERS_PAD_A { B12 }
48 #define ENCODERS_PAD_B { B13 }
49
50 #define MUSIC_MAP
51 #undef AUDIO_VOICES
52 #undef C6_AUDIO
53
54 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
55 // #define DEBOUNCE 6
56
57 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
58 //#define LOCKING_SUPPORT_ENABLE
59 /* Locking resynchronize hack */
60 //#define LOCKING_RESYNC_ENABLE
61
62 /*
63  * Force NKRO
64  *
65  * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
66  * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
67  * makefile for this to work.)
68  *
69  * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
70  * until the next keyboard reset.
71  *
72  * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
73  * fully operational during normal computer usage.
74  *
75  * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
76  * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
77  * bootmagic, NKRO mode will always be enabled until it is toggled again during a
78  * power-up.
79  *
80  */
81 //#define FORCE_NKRO
82
83 /*
84  * Feature disable options
85  *  These options are also useful to firmware size reduction.
86  */
87
88 /* disable debug print */
89 //#define NO_DEBUG
90
91 /* disable print */
92 //#define NO_PRINT
93
94 /* disable action features */
95 //#define NO_ACTION_LAYER
96 //#define NO_ACTION_TAPPING
97 //#define NO_ACTION_ONESHOT
98 //#define NO_ACTION_MACRO
99 //#define NO_ACTION_FUNCTION
100
101 /*
102  * MIDI options
103  */
104
105 /* Prevent use of disabled MIDI features in the keymap */
106 //#define MIDI_ENABLE_STRICT 1
107
108 /* enable basic MIDI features:
109    - MIDI notes can be sent when in Music mode is on
110 */
111 //#define MIDI_BASIC
112
113 /* enable advanced MIDI features:
114    - MIDI notes can be added to the keymap
115    - Octave shift and transpose
116    - Virtual sustain, portamento, and modulation wheel
117    - etc.
118 */
119 //#define MIDI_ADVANCED
120
121 /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
122 //#define MIDI_TONE_KEYCODE_OCTAVES 1
123
124 // #define WS2812_LED_N 2
125 // #define RGBLED_NUM WS2812_LED_N
126 // #define WS2812_TIM_N 2
127 // #define WS2812_TIM_CH 2
128 // #define PORT_WS2812     GPIOA
129 // #define PIN_WS2812      1
130 // #define WS2812_DMA_STREAM STM32_DMA1_STREAM2  // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
131 //#define WS2812_DMA_CHANNEL 7                  // DMA channel for TIMx_UP
132 //#define WS2812_EXTERNAL_PULLUP
133
134 #define DRIVER_ADDR_1 0b1010000
135 #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
136
137 #define DRIVER_COUNT 1
138 #define DRIVER_1_LED_TOTAL 47
139 #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
140
141 #define RGB_MATRIX_KEYPRESSES