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