]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/helix/rev2/config.h
b354d312d5511384ae15dabc7f01e950410083a7
[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 /* USB Device descriptor parameter */
23 #define VENDOR_ID       0xFEED
24 #define PRODUCT_ID      0x3060
25 #define DEVICE_VER      0x0001
26 #define MANUFACTURER    Yushakobo
27 #define PRODUCT         Helix Beta
28 #define DESCRIPTION     A split keyboard for the cheap makers
29
30
31 #define TAPPING_FORCE_HOLD
32 #define TAPPING_TERM 100
33
34 /* Use I2C or Serial */
35 #define USE_I2C
36 #define USE_SERIAL
37 //#define USE_MATRIX_I2C
38
39 /* Select hand configuration */
40 #define MASTER_LEFT
41 // #define MASTER_RIGHT
42 // #define EE_HANDS
43
44 // Helix keyboard OLED support
45 //      see ./rules.mk: OLED_ENABLE=yes or no
46 #ifdef OLED_ENABLE
47   #define SSD1306OLED
48 #endif
49
50 /* Select rows configuration */
51 // Rows are 4 or 5
52 // #define HELIX_ROWS 5 see ./rules.mk
53
54 /* key matrix size */
55 // Rows are doubled-up
56 #if  HELIX_ROWS == 4
57   #define MATRIX_ROWS 8
58   #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
59 #else
60   #define MATRIX_ROWS 10
61   #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
62 #endif
63
64 // wiring of each half
65 #define MATRIX_COLS 7
66 #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
67 // #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
68
69 /* define if matrix has ghost */
70 //#define MATRIX_HAS_GHOST
71
72 /* number of backlight levels */
73 // #define BACKLIGHT_LEVELS 3
74
75 /* Set 0 if debouncing isn't needed */
76 #define DEBOUNCING_DELAY 5
77
78 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
79 //#define LOCKING_SUPPORT_ENABLE
80 /* Locking resynchronize hack */
81 //#define LOCKING_RESYNC_ENABLE
82
83 /* key combination for command */
84 #define IS_COMMAND() ( \
85     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
86 )
87
88 /* ws2812 RGB LED */
89 #define RGB_DI_PIN D3
90 #define RGBLIGHT_TIMER
91 //#define RGBLED_NUM 12    // Number of LEDs. see ./keymaps/default/config.h
92 #define ws2812_PORTREG  PORTD
93 #define ws2812_DDRREG   DDRD
94
95 // Helix keyboard RGB LED support
96 //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
97 //    see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
98 #ifdef RGBLED_BACK
99   #if HELIX_ROWS == 4
100     #define RGBLED_NUM 25
101   #else
102     #define RGBLED_NUM 32
103   #endif
104 #else
105   #define RGBLED_NUM 6
106 #endif
107
108 #ifndef IOS_DEVICE_ENABLE
109   #if RGBLED_NUM <= 6
110     #define RGBLIGHT_LIMIT_VAL 255
111   #else
112     #if HELIX_ROWS == 4
113       #define RGBLIGHT_LIMIT_VAL 130
114     #else
115       #define RGBLIGHT_LIMIT_VAL 120
116     #endif
117   #endif
118   #define RGBLIGHT_VAL_STEP 17
119 #else
120   #if RGBLED_NUM <= 6
121     #define RGBLIGHT_LIMIT_VAL 90
122   #else
123     #if HELIX_ROWS == 4
124       #define RGBLIGHT_LIMIT_VAL 45
125     #else
126       #define RGBLIGHT_LIMIT_VAL 35
127     #endif
128   #endif
129   #define RGBLIGHT_VAL_STEP 4
130 #endif
131 #define RGBLIGHT_HUE_STEP 10
132 #define RGBLIGHT_SAT_STEP 17
133
134 #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
135 // USB_MAX_POWER_CONSUMPTION value for Helix keyboard
136 //  120  RGBoff, OLEDoff
137 //  120  OLED
138 //  330  RGB 6
139 //  300  RGB 32
140 //  310  OLED & RGB 32
141   #define USB_MAX_POWER_CONSUMPTION 400
142 #else
143   // fix iPhone and iPad power adapter issue
144   // iOS device need lessthan 100
145   #define USB_MAX_POWER_CONSUMPTION 100
146 #endif
147
148 /*
149  * Feature disable options
150  *  These options are also useful to firmware size reduction.
151  */
152
153 /* disable debug print */
154 // #define NO_DEBUG
155
156 /* disable print */
157 // #define NO_PRINT
158
159 /* disable action features */
160 //#define NO_ACTION_LAYER
161 //#define NO_ACTION_TAPPING
162 //#define NO_ACTION_ONESHOT
163 //#define NO_ACTION_MACRO
164 //#define NO_ACTION_FUNCTION
165
166
167 #endif