aboutsummaryrefslogtreecommitdiff
path: root/keyboards/ymdk_np21/config.h
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-09-01 15:30:07 +1000
committerGitHub <noreply@github.com>2020-08-31 22:30:07 -0700
commit0032cb026b7d4143fd61ed3cb3378eda5bb41292 (patch)
treedac28f633daecf3fca2e5cc11866df636b1482d7 /keyboards/ymdk_np21/config.h
parent854a94f383a3e292f783e845675ea4d8a269d552 (diff)
downloadqmk_firmware-0032cb026b7d4143fd61ed3cb3378eda5bb41292.tar.gz
qmk_firmware-0032cb026b7d4143fd61ed3cb3378eda5bb41292.zip
[Keyboard] YMDK NP21 refactor (#10181)
Diffstat (limited to 'keyboards/ymdk_np21/config.h')
-rw-r--r--keyboards/ymdk_np21/config.h119
1 files changed, 104 insertions, 15 deletions
diff --git a/keyboards/ymdk_np21/config.h b/keyboards/ymdk_np21/config.h
index 379663431..1ea6fb0ce 100644
--- a/keyboards/ymdk_np21/config.h
+++ b/keyboards/ymdk_np21/config.h
@@ -19,32 +19,121 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20#include "config_common.h" 20#include "config_common.h"
21 21
22#define VENDOR_ID 0x20A0 22/* USB Device descriptor parameter */
23#define PRODUCT_ID 0x422D 23#define VENDOR_ID 0x594D // "YM"
24#define DEVICE_VER 0x0200 24#define PRODUCT_ID 0x5021 // "P" 21
25#define MANUFACTURER YMDK 25#define DEVICE_VER 0x0200
26#define PRODUCT NP21 26#define MANUFACTURER YMDK
27#define PRODUCT NP21
27 28
28/* matrix size */ 29/* key matrix size */
29#define MATRIX_ROWS 4 30#define MATRIX_ROWS 4
30#define MATRIX_COLS 6 31#define MATRIX_COLS 6
32
33/*
34 * Keyboard Matrix Assignments
35 *
36 * Change this to how you wired your keyboard
37 * COLS: AVR pins used for columns, left to right
38 * ROWS: AVR pins used for rows, top to bottom
39 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
40 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
41 *
42 */
31#define MATRIX_ROW_PINS { B0, B1, B2, B3 } 43#define MATRIX_ROW_PINS { B0, B1, B2, B3 }
32#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5 } 44#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5 }
33 45
34/* COL2ROW or ROW2COL */ 46/* COL2ROW, ROW2COL */
35#define DIODE_DIRECTION COL2ROW 47#define DIODE_DIRECTION COL2ROW
36 48
37#define BACKLIGHT_PIN D4 49#define BACKLIGHT_PIN D4
38#define BACKLIGHT_LEVELS 12 50#define BACKLIGHT_LEVELS 12
39#define BACKLIGHT_BREATHING 51#define BACKLIGHT_BREATHING
40 52
41#define TAPPING_TOGGLE 3
42
43#define USB_MAX_POWER_CONSUMPTION 100
44
45/* RGB underglow */
46// The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards.
47// The same pin is used on the JJ40, at least.
48#define RGBLED_NUM 5 53#define RGBLED_NUM 5
49#define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. 54//#define RGBLIGHT_HUE_STEP 8
55//#define RGBLIGHT_SAT_STEP 8
56//#define RGBLIGHT_VAL_STEP 8
57//#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
58//#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
59/*== all animations enable ==*/
50#define RGBLIGHT_ANIMATIONS 60#define RGBLIGHT_ANIMATIONS
61/*== or choose animations ==*/
62//#define RGBLIGHT_EFFECT_BREATHING
63//#define RGBLIGHT_EFFECT_RAINBOW_MOOD
64//#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
65//#define RGBLIGHT_EFFECT_SNAKE
66//#define RGBLIGHT_EFFECT_KNIGHT
67//#define RGBLIGHT_EFFECT_CHRISTMAS
68//#define RGBLIGHT_EFFECT_STATIC_GRADIENT
69//#define RGBLIGHT_EFFECT_RGB_TEST
70//#define RGBLIGHT_EFFECT_ALTERNATING
71/*== customize breathing effect ==*/
72/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
73//#define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
74/*==== use exp() and sin() ====*/
75//#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
76//#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
77
78/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
79#define DEBOUNCE 5
80
81/* define if matrix has ghost (lacks anti-ghosting diodes) */
82//#define MATRIX_HAS_GHOST
83
84/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
85#define LOCKING_SUPPORT_ENABLE
86/* Locking resynchronize hack */
87#define LOCKING_RESYNC_ENABLE
88
89/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
90 * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
91 */
92//#define GRAVE_ESC_CTRL_OVERRIDE
93
94/*
95 * Force NKRO
96 *
97 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
98 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
99 * makefile for this to work.)
100 *
101 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
102 * until the next keyboard reset.
103 *
104 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
105 * fully operational during normal computer usage.
106 *
107 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
108 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
109 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
110 * power-up.
111 *
112 */
113//#define FORCE_NKRO
114
115/*
116 * Feature disable options
117 * These options are also useful to firmware size reduction.
118 */
119
120/* disable debug print */
121//#define NO_DEBUG
122
123/* disable print */
124//#define NO_PRINT
125
126/* disable action features */
127//#define NO_ACTION_LAYER
128//#define NO_ACTION_TAPPING
129//#define NO_ACTION_ONESHOT
130
131/* disable these deprecated features by default */
132#define NO_ACTION_MACRO
133#define NO_ACTION_FUNCTION
134
135/* Bootmagic Lite key configuration */
136//#define BOOTMAGIC_LITE_ROW 0
137//#define BOOTMAGIC_LITE_COLUMN 0
138
139#define USB_MAX_POWER_CONSUMPTION 100