]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/helix/rev2/config.h
Helix fix configrator problem (#3270)
[qmk_firmware.git] / keyboards / helix / rev2 / config.h
1 /*
2 Copyright 2012 Jun Wako <wakojun@gmail.com>
3 Copyright 2015 Jack Humbert
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef REV2_CONFIG_H
20 #define REV2_CONFIG_H
21
22 #include "../config.h"
23
24 /* USB Device descriptor parameter */
25 #define VENDOR_ID       0xFEED
26 #define PRODUCT_ID      0x3060
27 #define DEVICE_VER      0x0001
28 #define MANUFACTURER    Yushakobo
29 #define PRODUCT         Helix Beta
30 #define DESCRIPTION     A split keyboard for the cheap makers
31
32
33 #define PREVENT_STUCK_MODIFIERS
34 #define TAPPING_FORCE_HOLD
35 #define TAPPING_TERM 100
36
37 /* Use I2C or Serial */
38 #define USE_I2C
39 #define USE_SERIAL
40 #define USE_SERIAL_PD2
41 //#define USE_MATRIX_I2C
42
43 /* Select hand configuration */
44 #define MASTER_LEFT
45 // #define MASTER_RIGHT
46 // #define EE_HANDS
47
48 // Helix keyboard OLED support
49 //      see ./rules.mk: OLED_ENABLE=yes or no
50 #ifdef OLED_ENABLE
51   #define SSD1306OLED
52 #endif
53
54 /* Select rows configuration */
55 // Rows are 4 or 5
56 // #define HELIX_ROWS 5 see ./rules.mk
57
58 /* key matrix size */
59 // Rows are doubled-up
60 #if  HELIX_ROWS == 4
61   #define MATRIX_ROWS 8
62   #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
63 #else
64   #define MATRIX_ROWS 10
65   #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
66 #endif
67
68 // wiring of each half
69 #define MATRIX_COLS 7
70 #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
71 // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
72
73 /* define if matrix has ghost */
74 //#define MATRIX_HAS_GHOST
75
76 /* number of backlight levels */
77 // #define BACKLIGHT_LEVELS 3
78
79 /* Set 0 if debouncing isn't needed */
80 #define DEBOUNCING_DELAY 5
81
82 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
83 //#define LOCKING_SUPPORT_ENABLE
84 /* Locking resynchronize hack */
85 //#define LOCKING_RESYNC_ENABLE
86
87 /* key combination for command */
88 #define IS_COMMAND() ( \
89     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
90 )
91
92 /* ws2812 RGB LED */
93 #define RGB_DI_PIN D3
94 #define RGBLIGHT_TIMER
95 //#define RGBLED_NUM 12    // Number of LEDs. see ./keymaps/default/config.h
96 #define ws2812_PORTREG  PORTD
97 #define ws2812_DDRREG   DDRD
98
99 // Helix keyboard RGB LED support
100 //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
101 //    see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
102 #ifdef RGBLED_BACK
103   #if HELIX_ROWS == 4
104     #define RGBLED_NUM 25
105   #else
106     #define RGBLED_NUM 32
107   #endif
108 #else
109   #define RGBLED_NUM 6
110 #endif
111
112 #ifndef IOS_DEVICE_ENABLE
113   #if RGBLED_NUM <= 6
114     #define RGBLIGHT_LIMIT_VAL 255
115   #else
116     #if HELIX_ROWS == 4
117       #define RGBLIGHT_LIMIT_VAL 130
118     #else
119       #define RGBLIGHT_LIMIT_VAL 120
120     #endif
121   #endif
122   #define RGBLIGHT_VAL_STEP 17
123 #else
124   #if RGBLED_NUM <= 6
125     #define RGBLIGHT_LIMIT_VAL 90
126   #else
127     #if HELIX_ROWS == 4
128       #define RGBLIGHT_LIMIT_VAL 45
129     #else
130       #define RGBLIGHT_LIMIT_VAL 35
131     #endif
132   #endif
133   #define RGBLIGHT_VAL_STEP 4
134 #endif
135 #define RGBLIGHT_HUE_STEP 10
136 #define RGBLIGHT_SAT_STEP 17
137
138 #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
139 // USB_MAX_POWER_CONSUMPTION value for Helix keyboard
140 //  120  RGBoff, OLEDoff
141 //  120  OLED
142 //  330  RGB 6
143 //  300  RGB 32
144 //  310  OLED & RGB 32
145   #define USB_MAX_POWER_CONSUMPTION 400
146 #else
147   // fix iPhone and iPad power adapter issue
148   // iOS device need lessthan 100
149   #define USB_MAX_POWER_CONSUMPTION 100
150 #endif
151
152 /*
153  * Feature disable options
154  *  These options are also useful to firmware size reduction.
155  */
156
157 /* disable debug print */
158 // #define NO_DEBUG
159
160 /* disable print */
161 // #define NO_PRINT
162
163 /* disable action features */
164 //#define NO_ACTION_LAYER
165 //#define NO_ACTION_TAPPING
166 //#define NO_ACTION_ONESHOT
167 //#define NO_ACTION_MACRO
168 //#define NO_ACTION_FUNCTION
169
170
171 #endif