Commit | Line | Data |
---|---|---|
323cd357 | 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 | ||
6fa3cfbf | 18 | #pragma once |
323cd357 | 19 | |
20 | #include "config_common.h" | |
21 | ||
22 | /* USB Device descriptor parameter */ | |
2bfac351 | 23 | #define VENDOR_ID 0x8968 |
24 | #define PRODUCT_ID 0x4853 | |
25 | #define DEVICE_VER 0x0002 | |
323cd357 | 26 | #define MANUFACTURER Yiancar-Designs |
6fa3cfbf | 27 | #define PRODUCT HS60 V2 |
323cd357 | 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 | ||
6fa3cfbf | 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 | |
323cd357 | 37 | |
fc069869 | 38 | /* COL2ROW, ROW2COL*/ |
323cd357 | 39 | #define DIODE_DIRECTION COL2ROW |
40 | ||
41 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | |
faaaa134 | 42 | #define DEBOUNCE 5 |
323cd357 | 43 | |
44 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | |
45 | //#define MATRIX_HAS_GHOST | |
46 | ||
323cd357 | 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 | ||
b05c0e46 DJ |
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 | */ | |
323cd357 | 84 | |
2bfac351 | 85 | /* Backlight options */ |
323cd357 | 86 | |
2bfac351 | 87 | #define RGB_BACKLIGHT_ENABLED 1 |
323cd357 | 88 | |
2bfac351 | 89 | #define RGB_BACKLIGHT_HS60 |
323cd357 | 90 | |
2bfac351 | 91 | // they aren't really used if RGB_BACKLIGHT_HS60 defined |
92 | #define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 | |
93 | #define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 | |
94 | #define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 | |
95 | #define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 | |
96 | #define RGB_BACKLIGHT_USE_ISO_ENTER 0 | |
97 | #define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 | |
323cd357 | 98 | |
2bfac351 | 99 | // disable backlight when USB suspended (PC sleep/hibernate/shutdown) |
100 | #define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 | |
323cd357 | 101 | |
2bfac351 | 102 | // disable backlight after timeout in minutes, 0 = no timeout |
103 | #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 | |
323cd357 | 104 | |
852d1254 W |
105 | // the default brightness |
106 | #define RGB_BACKLIGHT_BRIGHTNESS 255 | |
107 | ||
2bfac351 | 108 | // the default effect (RGB test) |
5e43f879 | 109 | #define RGB_BACKLIGHT_EFFECT 6 |
a659666e | 110 | |
852d1254 W |
111 | // the default effect speed (0-3) |
112 | #define RGB_BACKLIGHT_EFFECT_SPEED 0 | |
113 | ||
114 | // the default color1 and color2 | |
115 | #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } | |
116 | #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } | |
117 | ||
2bfac351 | 118 | #define DRIVER_COUNT 2 |
119 | #define DRIVER_LED_TOTAL 64 | |
120 | ||
121 | // These define which keys in the matrix are alphas/mods | |
122 | // Used for backlight effects so colors are different for | |
123 | // alphas vs. mods | |
124 | // Each value is for a row, bit 0 is column 0 | |
125 | // Alpha=0 Mod=1 | |
126 | #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0010000000000001 | |
127 | #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 | |
128 | #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0010000000000001 | |
129 | #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001 | |
130 | #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 | |
131 | ||
eb0bbe99 W |
132 | #define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
133 | #define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | |
134 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | |
135 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | |
136 | ||
320822d7 W |
137 | // Backlight config starts after VIA's EEPROM usage, |
138 | // dynamic keymaps start after this. | |
139 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 | |
140 | ||
484a9b12 W |
141 | // VIA lighting is handled by the keyboard-level code |
142 | #define VIA_CUSTOM_LIGHTING_ENABLE |