]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/xd004/v1/config.h
[Keyboard] Add support for XD004 macro keyboard (#6337)
[qmk_firmware.git] / keyboards / xd004 / v1 / config.h
1 /*
2 Copyright 2019 Sidney Bovet <sidney.bovet@gmail.com>
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 /*
19 Note: the following configuration uses 98% of the flash memory, be
20 careful if you enable anything else. Also have a look at rules.mk
21 where some things are disabled to save space as well.
22 */
23
24 #pragma once
25
26 #include "config_common.h"
27
28 /* USB Device descriptor parameter */
29 #define VENDOR_ID 0xCDCD
30 #define PRODUCT_ID 0x0404
31 #define DEVICE_VER 0x0001
32 // Note: unsure about manufacturer
33 #define MANUFACTURER XIUDI
34 #define PRODUCT XD004 v1
35 #define DESCRIPTION XD004 v1 Keyboard PCB
36
37 /* key matrix size */
38 #define MATRIX_ROWS 1
39 #define MATRIX_COLS 4
40
41 /*
42  * Keyboard Matrix Assignments
43  *
44  * On this board we have direct connection: no diodes.
45  */
46 #define DIRECT_PINS        \
47     {                      \
48         { D3, D0, C4, B4 } \
49     }
50 #define UNUSED_PINS
51
52 /* Backlight Setup */
53 // Looks like each backlight LED is connected to a single output, D5 is the one furtherst away from USB port
54 #define BACKLIGHT_PIN D5
55 #define BACKLIGHT_LEVELS 6
56
57 /* COL2ROW or ROW2COL */
58 #define DIODE_DIRECTION COL2ROW
59
60 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
61 #define DEBOUNCE 5
62
63 /* RGB Underglow
64 This will not be used, as RGBLIGHT_ENABLE is set to 'no' in rules.mk
65 We do not have enough space in the flash for this at the moment, maybe
66 further optimizations can be done on that side.
67 */
68 #define RGB_DI_PIN C6
69 #define RGBLIGHT_EFFECT_STATIC_GRADIENT
70 #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
71 #define RGBLED_NUM 2
72 #define RGBLIGHT_HUE_STEP 10
73 #define RGBLIGHT_SAT_STEP 17
74 #define RGBLIGHT_VAL_STEP 17
75
76 /* disable action features */
77 // #define NO_ACTION_ONESHOT // 462 bytes <- this needs to be un-commented out if Link Time Optimization is disabled, otherwise file is too large
78 // The two below are implicit since we use LINK_TIME_OPTIMIZATION_ENABLE (in rules.mk)
79 // #define NO_ACTION_MACRO
80 // #define NO_ACTION_FUNCTION