]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/hs60/v2/config.h
Keyboard: Add HS60 V2 (#4250)
[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       0xFEED
24 #define PRODUCT_ID      0x0258
25 #define DEVICE_VER      0x0001
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 DEBOUNCE 0
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 /*
74  * Magic Key Options
75  *
76  * Magic keys are hotkey commands that allow control over firmware functions of
77  * the keyboard. They are best used in combination with the HID Listen program,
78  * found here: https://www.pjrc.com/teensy/hid_listen.html
79  *
80  * The options below allow the magic key functionality to be changed. This is
81  * useful if your keyboard/keypad is missing keys and you want magic key support.
82  *
83  */
84
85 /* key combination for magic key command */
86 #define IS_COMMAND() ( \
87     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
88 )
89
90 /*
91  * Feature disable options
92  *  These options are also useful to firmware size reduction.
93  */
94
95 /* disable debug print */
96 //#define NO_DEBUG
97
98 /* disable print */
99 //#define NO_PRINT
100
101 /* Backlight options */
102
103 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
104 #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
105 #define RGB_MATRIX_SKIP_FRAMES 3
106
107 #define DRIVER_ADDR_1 0b1010000
108 #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
109
110 #define DRIVER_COUNT 2
111 #ifdef HS60_ANSI
112 #define DRIVER_1_LED_TOTAL 61
113 #else
114 #define DRIVER_1_LED_TOTAL 62
115 #endif
116
117 #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL