]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/hadron/ver3/config.h
180492182515d2b205c6c269590580014e38e1f5
[qmk_firmware.git] / keyboards / hadron / ver3 / 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 REV3_CONFIG_H
19 #define REV3_CONFIG_H
20
21 /* USB Device descriptor parameter */
22 #define DEVICE_VER 0x0003
23
24 #undef MATRIX_ROWS
25 #undef MATRIX_COLS
26 /* key matrix size */
27 #define MATRIX_ROWS 5
28 #define MATRIX_COLS 15
29
30 //Audio
31 #undef AUDIO_VOICES
32 #undef C6_AUDIO
33
34 #ifdef AUDIO_ENABLE
35     #define STARTUP_SONG SONG(PLANCK_SOUND)
36     // #define STARTUP_SONG SONG(NO_SOUND)
37
38     #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
39                                   SONG(COLEMAK_SOUND), \
40                                   SONG(DVORAK_SOUND) \
41                                 }
42 #define AUDIO_CLICKY
43   /* to enable clicky on startup */
44   //#define AUDIO_CLICKY_ON
45 #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
46 #endif
47
48 //configure qwiic micro_oled driver for the 128x32 oled
49 #ifdef QWIIC_MICRO_OLED_ENABLE
50
51 #undef I2C_ADDRESS_SA0_1
52 #define I2C_ADDRESS_SA0_1 0b0111100
53 #define LCDWIDTH      128
54 #define LCDHEIGHT     32
55 #define micro_oled_rotate_180
56
57 #endif
58 /*
59  * Keyboard Matrix Assignments
60  *
61  * Change this to how you wired your keyboard
62  * COLS: AVR pins used for columns, left to right
63  * ROWS: AVR pins used for rows, top to bottom
64  * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
65  *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
66  *
67 */
68
69 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
70 #define DEBOUNCE 6
71
72 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
73 //#define LOCKING_SUPPORT_ENABLE
74 /* Locking resynchronize hack */
75 //#define LOCKING_RESYNC_ENABLE
76
77 /*
78  * Force NKRO
79  *
80  * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
81  * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
82  * makefile for this to work.)
83  *
84  * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
85  * until the next keyboard reset.
86  *
87  * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
88  * fully operational during normal computer usage.
89  *
90  * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
91  * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
92  * bootmagic, NKRO mode will always be enabled until it is toggled again during a
93  * power-up.
94  *
95  */
96 //#define FORCE_NKRO
97
98 /*
99  * Feature disable options
100  *  These options are also useful to firmware size reduction.
101  */
102
103 /* disable debug print */
104 //#define NO_DEBUG
105
106 /* disable print */
107 //#define NO_PRINT
108
109 /* disable action features */
110 //#define NO_ACTION_LAYER
111 //#define NO_ACTION_TAPPING
112 //#define NO_ACTION_ONESHOT
113 //#define NO_ACTION_MACRO
114 //#define NO_ACTION_FUNCTION
115 /*
116  * MIDI options
117  */
118
119 /* Prevent use of disabled MIDI features in the keymap */
120 //#define MIDI_ENABLE_STRICT 1
121
122 /* enable basic MIDI features:
123    - MIDI notes can be sent when in Music mode is on
124 */
125
126 #define MIDI_BASIC
127
128 /* enable advanced MIDI features:
129    - MIDI notes can be added to the keymap
130    - Octave shift and transpose
131    - Virtual sustain, portamento, and modulation wheel
132    - etc.
133 */
134 //#define MIDI_ADVANCED
135
136 /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
137 //#define MIDI_TONE_KEYCODE_OCTAVES 2
138
139 /* Haptic Driver initialization settings
140  * Feedback Control Settings */
141 #define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
142 #define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
143 #define FB_LOOPGAIN 1 /* For  Low:0, Medium:1, High:2, Very High:3 */
144
145 /* default 3V ERM vibration motor voltage and library*/
146 #if FB_ERM_LRA == 0 
147 #define RATED_VOLTAGE 3
148 #define V_RMS 2.3
149 #define V_PEAK 3.30
150 /* Library Selection */
151 #define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
152
153 /* default 2V LRA voltage and library */
154 #elif FB_ERM_LRA == 1
155 #define RATED_VOLTAGE 2
156 #define V_RMS 2.0
157 #define V_PEAK 2.85
158 #define F_LRA 200
159 /* Library Selection */
160 #define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
161
162 #endif
163
164 /* Control 1 register settings */
165 #define DRIVE_TIME 25
166 #define AC_COUPLE 0
167 #define STARTUP_BOOST 1
168
169 /* Control 2 Settings */
170 #define BIDIR_INPUT 1
171 #define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
172 #define SAMPLE_TIME 3
173 #define BLANKING_TIME 1
174 #define IDISS_TIME 1
175
176 /* Control 3 settings */
177 #define NG_THRESH 2
178 #define ERM_OPEN_LOOP 1
179 #define SUPPLY_COMP_DIS 0
180 #define DATA_FORMAT_RTO 0
181 #define LRA_DRIVE_MODE 0
182 #define N_PWM_ANALOG 0
183 #define LRA_OPEN_LOOP 0
184 /* Control 4 settings */
185 #define ZC_DET_TIME 0
186 #define AUTO_CAL_TIME 3
187
188 //#define RGBLIGHT_ANIMATIONS
189
190 //#define RGBLED_NUM 10
191 //#define RGB_DI_PIN B5
192 //#define DRIVER_LED_TOTAL RGBLED_NUM
193
194 //#define RGB_MATRIX_KEYPRESSES
195
196 #define SOLENOID_PIN A14
197
198 #endif