]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/hs60/v2/config.h
DO NOT USE Merge branch 'master' into debounce_refactor
[qmk_firmware.git] / keyboards / hs60 / v2 / config.h
1 /*
2 Copyright 2018 Yiancar
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #pragma once
19
20 #include "config_common.h"
21
22 /* USB Device descriptor parameter */
23 #define VENDOR_ID       0x8968
24 #define PRODUCT_ID      0x4853
25 #define DEVICE_VER      0x0002
26 #define MANUFACTURER    Yiancar-Designs
27 #define PRODUCT         HS60 V2
28 #define DESCRIPTION     GH60 compatible, tool free RGB keyboard
29
30 /* key matrix size */
31 #define MATRIX_ROWS 5
32 #define MATRIX_COLS 14
33
34 #define MATRIX_ROW_PINS { B3, B4, B5, A8, A4 }
35 #define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3 }
36 // To enable debugger set A13 A14 -> A5 A6
37
38 /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
39 #define DIODE_DIRECTION COL2ROW
40
41 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
42 #define DEBOUNCING_DELAY 5
43
44 /* define if matrix has ghost (lacks anti-ghosting diodes) */
45 //#define MATRIX_HAS_GHOST
46
47 /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
48  * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
49  */
50 // #define GRAVE_ESC_CTRL_OVERRIDE
51
52 /*
53  * Force NKRO
54  *
55  * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
56  * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
57  * makefile for this to work.)
58  *
59  * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
60  * until the next keyboard reset.
61  *
62  * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
63  * fully operational during normal computer usage.
64  *
65  * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
66  * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
67  * bootmagic, NKRO mode will always be enabled until it is toggled again during a
68  * power-up.
69  *
70  */
71 //#define FORCE_NKRO
72
73 /* key combination for magic key command */
74 #define IS_COMMAND() ( \
75     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
76 )
77
78 /* Backlight options */
79
80 #define RGB_BACKLIGHT_ENABLED 1
81
82 #define RGB_BACKLIGHT_HS60
83
84 // they aren't really used if RGB_BACKLIGHT_HS60 defined
85 #define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0
86 #define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0
87 #define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0
88 #define RGB_BACKLIGHT_USE_7U_SPACEBAR 0
89 #define RGB_BACKLIGHT_USE_ISO_ENTER 0
90 #define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0
91
92 // disable backlight when USB suspended (PC sleep/hibernate/shutdown)
93 #define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0
94
95 // disable backlight after timeout in minutes, 0 = no timeout
96 #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
97
98 // the default effect (RGB test)
99 #define RGB_BACKLIGHT_EFFECT 255
100
101 #define DRIVER_COUNT 2
102 #define DRIVER_LED_TOTAL 64
103
104 // These define which keys in the matrix are alphas/mods
105 // Used for backlight effects so colors are different for
106 // alphas vs. mods
107 // Each value is for a row, bit 0 is column 0
108 // Alpha=0 Mod=1
109 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0010000000000001
110 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001
111 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0010000000000001
112 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001
113 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111
114
115 // TODO: refactor with new user EEPROM code (coming soon)
116 #define EEPROM_MAGIC 0x451F
117 #define EEPROM_MAGIC_ADDR 32
118 // Bump this every time we change what we store
119 // This will automatically reset the EEPROM with defaults
120 // and avoid loading invalid data from the EEPROM
121 #define EEPROM_VERSION 0x08
122 #define EEPROM_VERSION_ADDR 34
123
124 // Backlight config starts after EEPROM version
125 #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35
126 // Dynamic keymap starts after backlight config (35+31)
127 #define DYNAMIC_KEYMAP_EEPROM_ADDR 66
128 #define DYNAMIC_KEYMAP_LAYER_COUNT 4
129 // Dynamic macro starts after dynamic keymaps (66+(4*5*14*2)) = (66+560)
130 #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 626
131 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398
132 #define DYNAMIC_KEYMAP_MACRO_COUNT 16