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