aboutsummaryrefslogtreecommitdiff
path: root/keyboards/nk65/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/nk65/config.h')
-rwxr-xr-xkeyboards/nk65/config.h154
1 files changed, 154 insertions, 0 deletions
diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h
new file mode 100755
index 000000000..0edb1bb62
--- /dev/null
+++ b/keyboards/nk65/config.h
@@ -0,0 +1,154 @@
1/*
2Copyright 2019 Yiancar
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along 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 0x4E4B
25#define DEVICE_VER 0x0001
26#define MANUFACTURER Yiancar-Designs
27#define PRODUCT NK65
28#define DESCRIPTION A 65-percent, tool-free RGB keyboard
29
30/* key matrix size */
31#define MATRIX_ROWS 5
32#define MATRIX_COLS 15
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, A5 }
36// To enable debugger set A13 A14 -> A5 A7
37
38/* COL2ROW, ROW2COL*/
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/*
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/* Backlight options */
86
87#define RGB_BACKLIGHT_ENABLED 1
88
89#define RGB_BACKLIGHT_NK65
90
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
98
99// disable backlight when USB suspended (PC sleep/hibernate/shutdown)
100#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0
101
102// disable backlight after timeout in minutes, 0 = no timeout
103#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
104
105// the default brightness
106#define RGB_BACKLIGHT_BRIGHTNESS 255
107
108// the default effect (RGB test)
109#define RGB_BACKLIGHT_EFFECT 255
110
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
118#define DRIVER_COUNT 2
119#define DRIVER_LED_TOTAL 128
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 0b0110000000000001
127#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0100000000000001
128#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0110000000000001
129#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001
130#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111111000000111
131
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
137// TODO: refactor with new user EEPROM code (coming soon)
138#define EEPROM_MAGIC 0x451F
139#define EEPROM_MAGIC_ADDR 32
140// Bump this every time we change what we store
141// This will automatically reset the EEPROM with defaults
142// and avoid loading invalid data from the EEPROM
143#define EEPROM_VERSION 0x08
144#define EEPROM_VERSION_ADDR 34
145
146// Backlight config starts after EEPROM version
147#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35
148// Dynamic keymap starts after backlight config (35+32)
149#define DYNAMIC_KEYMAP_EEPROM_ADDR 67
150#define DYNAMIC_KEYMAP_LAYER_COUNT 4
151// Dynamic macro starts after dynamic keymaps (67+(4*5*15*2)) = (67+600)
152#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 667
153#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398
154#define DYNAMIC_KEYMAP_MACRO_COUNT 16