]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/helix/rev2/keymaps/five_rows/config.h
update Helix keymap 'five_rows' (#2635)
[qmk_firmware.git] / keyboards / helix / rev2 / keymaps / five_rows / config.h
1 /*
2 This is the c configuration file for the keymap
3
4 Copyright 2012 Jun Wako <wakojun@gmail.com>
5 Copyright 2015 Jack Humbert
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #ifndef CONFIG_USER_H
22 #define CONFIG_USER_H
23
24 #include "../../config.h"
25
26 /* Use I2C or Serial */
27
28 #define USE_I2C
29 #define USE_SERIAL
30 //#define USE_MATRIX_I2C
31
32 /* Select hand configuration */
33
34 #define MASTER_LEFT
35 // #define MASTER_RIGHT
36 // #define EE_HANDS
37
38 // Helix keyboard OLED support
39 //      see ./rules.mk: OLED_ENABLE=yes or no
40 #ifdef OLED_ENABLE
41   #define SSD1306OLED
42 #endif
43
44 /* Select rows configuration */
45 #define HELIX_ROWS 5
46
47 /* key matrix size */
48 // Rows are doubled-up
49 #if  HELIX_ROWS == 4
50   #define MATRIX_ROWS 8
51   #define MATRIX_COLS 7
52   #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
53 #elif HELIX_ROWS == 5
54   #define MATRIX_ROWS 10
55   #define MATRIX_COLS 7
56   #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
57 #else
58   #error "expected HELIX_ROWS 4 or 5"
59 #endif
60
61 #define USE_SERIAL_PD2
62
63 #define PREVENT_STUCK_MODIFIERS
64 #define TAPPING_FORCE_HOLD
65 #define TAPPING_TERM 100
66
67 #undef RGBLED_NUM
68 // Helix keyboard RGB LED support
69 //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
70 //    see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
71 #ifdef RGBLED_BACK
72   #if HELIX_ROWS == 4
73     #define RGBLED_NUM 25
74   #elif HELIX_ROWS == 5
75     #define RGBLED_NUM 32
76   #endif
77 #else
78   #define RGBLED_NUM 6
79 #endif
80
81 #ifndef IOS_DEVICE_ENABLE
82   #if RGBLED_NUM <= 6
83     #define RGBLIGHT_LIMIT_VAL 255
84   #else
85     #if HELIX_ROWS == 5
86       #define RGBLIGHT_LIMIT_VAL 120
87     #else
88       #define RGBLIGHT_LIMIT_VAL 130
89     #endif
90   #endif
91   #define RGBLIGHT_VAL_STEP 17
92 #else
93   #if RGBLED_NUM <= 6
94     #define RGBLIGHT_LIMIT_VAL 90
95   #else
96     #if HELIX_ROWS == 5
97       #define RGBLIGHT_LIMIT_VAL 35
98     #else
99       #define RGBLIGHT_LIMIT_VAL 45
100     #endif
101   #endif
102   #define RGBLIGHT_VAL_STEP 4
103 #endif
104 #define RGBLIGHT_HUE_STEP 10
105 #define RGBLIGHT_SAT_STEP 17
106
107
108 #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
109 // USB_MAX_POWER_CONSUMPTION value for Helix keyboard
110 //  120  RGBoff, OLEDoff
111 //  120  OLED
112 //  330  RGB 6
113 //  300  RGB 32
114 //  310  OLED & RGB 32
115   #define USB_MAX_POWER_CONSUMPTION 400
116 #else
117   // fix iPhone and iPad power adapter issue
118   // iOS device need lessthan 100
119   #define USB_MAX_POWER_CONSUMPTION 100
120 #endif
121
122 #endif /* CONFIG_USER_H */