]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/zinc/reva/config.h
Keyboard: Add new keyboard Zinc (#4245)
[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
30 #define PREVENT_STUCK_MODIFIERS
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
45 /* key matrix size */
46 // Rows are doubled-up
47   #define MATRIX_ROWS 8
48   #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
49
50 // wiring of each half
51 #define MATRIX_COLS 6
52 #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3}
53
54 /* define if matrix has ghost */
55 //#define MATRIX_HAS_GHOST
56
57 /* number of backlight levels */
58 // #define BACKLIGHT_LEVELS 3
59
60 /* Set 0 if debouncing isn't needed */
61 #define DEBOUNCING_DELAY 5
62
63 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
64 //#define LOCKING_SUPPORT_ENABLE
65 /* Locking resynchronize hack */
66 //#define LOCKING_RESYNC_ENABLE
67
68 /* key combination for command */
69 #define IS_COMMAND() ( \
70     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
71 )
72
73 /* ws2812 RGB LED */
74 #define RGB_DI_PIN D3
75 #define RGBLIGHT_TIMER
76 //#define RGBLED_NUM 24    // Number of LEDs. see ./keymaps/default/config.h
77 #define ws2812_PORTREG  PORTD
78 #define ws2812_DDRREG   DDRD
79
80 // RGB LED support
81 //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
82 //    see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
83 #ifdef RGBLED_BACK
84   #define RGBLED_NUM 24
85 #else
86   #define RGBLED_NUM 6
87 #endif
88
89 #ifndef IOS_DEVICE_ENABLE
90   #if RGBLED_NUM <= 6
91     #define RGBLIGHT_LIMIT_VAL 255
92   #else
93     #if RGBLED_NUM <= 16
94       #define RGBLIGHT_LIMIT_VAL 130
95     #else
96       #define RGBLIGHT_LIMIT_VAL 120
97     #endif
98   #endif
99   #define RGBLIGHT_VAL_STEP 17
100 #else
101   #if RGBLED_NUM <= 6
102     #define RGBLIGHT_LIMIT_VAL 90
103   #else
104     #if RGBLED_NUM <= 16
105       #define RGBLIGHT_LIMIT_VAL 45
106     #else
107       #define RGBLIGHT_LIMIT_VAL 35
108     #endif
109   #endif
110   #define RGBLIGHT_VAL_STEP 4
111 #endif
112 #define RGBLIGHT_HUE_STEP 10
113 #define RGBLIGHT_SAT_STEP 17
114
115 #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
116 // USB_MAX_POWER_CONSUMPTION value
117 //  120  RGBoff
118 //  330  RGB 6
119 //  300  RGB 32
120   #define USB_MAX_POWER_CONSUMPTION 400
121 #else
122   // fix iPhone and iPad power adapter issue
123   // iOS device need lessthan 100
124   #define USB_MAX_POWER_CONSUMPTION 100
125 #endif
126
127 /*
128  * Feature disable options
129  *  These options are also useful to firmware size reduction.
130  */
131
132 /* disable debug print */
133 // #define NO_DEBUG
134
135 /* disable print */
136 // #define NO_PRINT
137
138 /* disable action features */
139 //#define NO_ACTION_LAYER
140 //#define NO_ACTION_TAPPING
141 //#define NO_ACTION_ONESHOT
142 //#define NO_ACTION_MACRO
143 //#define NO_ACTION_FUNCTION