summaryrefslogtreecommitdiff
path: root/keyboards/ymdk
diff options
context:
space:
mode:
authorpeepeetee <43021794+peepeetee@users.noreply.github.com>2022-01-11 08:56:59 +0800
committerGitHub <noreply@github.com>2022-01-10 16:56:59 -0800
commit2b212cf692ecc70b587389112bca0a7668cef050 (patch)
tree25125b9ef6db34ecfcccd9b0e4a015c211e7ddcc /keyboards/ymdk
parent65e7d0c01f4524db24b66a9dcb692f3557cf8c46 (diff)
[Keyboard] Rename ymdk_np21 to np21, move to ymdk vendor folder (#15641)
Diffstat (limited to 'keyboards/ymdk')
-rw-r--r--keyboards/ymdk/np21/config.h141
-rw-r--r--keyboards/ymdk/np21/info.json100
-rw-r--r--keyboards/ymdk/np21/keymaps/default/keymap.c26
-rw-r--r--keyboards/ymdk/np21/keymaps/default/readme.md26
-rw-r--r--keyboards/ymdk/np21/keymaps/via/keymap.c52
-rw-r--r--keyboards/ymdk/np21/keymaps/via/rules.mk2
-rw-r--r--keyboards/ymdk/np21/np21.c19
-rw-r--r--keyboards/ymdk/np21/np21.h64
-rw-r--r--keyboards/ymdk/np21/readme.md21
-rw-r--r--keyboards/ymdk/np21/rules.mk19
10 files changed, 470 insertions, 0 deletions
diff --git a/keyboards/ymdk/np21/config.h b/keyboards/ymdk/np21/config.h
new file mode 100644
index 0000000000..83423792b0
--- /dev/null
+++ b/keyboards/ymdk/np21/config.h
@@ -0,0 +1,141 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x594D // "YM"
+#define PRODUCT_ID 0x5021 // "P" 21
+#define DEVICE_VER 0x0200
+#define MANUFACTURER YMDK
+#define PRODUCT NP21
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 6
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+ */
+#define MATRIX_ROW_PINS { B0, B1, B2, B3 }
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5 }
+
+/* COL2ROW, ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+#define LED_NUM_LOCK_PIN D0
+
+#define BACKLIGHT_PIN D4
+#define BACKLIGHT_LEVELS 12
+#define BACKLIGHT_BREATHING
+
+#define RGBLED_NUM 5
+//#define RGBLIGHT_HUE_STEP 8
+//#define RGBLIGHT_SAT_STEP 8
+//#define RGBLIGHT_VAL_STEP 8
+//#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+//#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+/*== all animations enable ==*/
+#define RGBLIGHT_ANIMATIONS
+/*== or choose animations ==*/
+//#define RGBLIGHT_EFFECT_BREATHING
+//#define RGBLIGHT_EFFECT_RAINBOW_MOOD
+//#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+//#define RGBLIGHT_EFFECT_SNAKE
+//#define RGBLIGHT_EFFECT_KNIGHT
+//#define RGBLIGHT_EFFECT_CHRISTMAS
+//#define RGBLIGHT_EFFECT_STATIC_GRADIENT
+//#define RGBLIGHT_EFFECT_RGB_TEST
+//#define RGBLIGHT_EFFECT_ALTERNATING
+/*== customize breathing effect ==*/
+/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
+//#define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
+/*==== use exp() and sin() ====*/
+//#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
+//#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+//#define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+
+/* disable these deprecated features by default */
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+
+/* Bootmagic Lite key configuration */
+//#define BOOTMAGIC_LITE_ROW 0
+//#define BOOTMAGIC_LITE_COLUMN 0
+
+#define USB_MAX_POWER_CONSUMPTION 100
diff --git a/keyboards/ymdk/np21/info.json b/keyboards/ymdk/np21/info.json
new file mode 100644
index 0000000000..6a611d7a38
--- /dev/null
+++ b/keyboards/ymdk/np21/info.json
@@ -0,0 +1,100 @@
+{
+ "keyboard_name": "YMDK NP21",
+ "maintainer": "qmk",
+ "layouts": {
+ "LAYOUT_ortho_6x4": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+
+ {"x": 0, "y": 1.25},
+ {"x": 1, "y": 1.25},
+ {"x": 2, "y": 1.25},
+ {"x": 3, "y": 1.25},
+
+ {"x": 0, "y": 2.25},
+ {"x": 1, "y": 2.25},
+ {"x": 2, "y": 2.25},
+ {"x": 3, "y": 2.25},
+
+ {"x": 0, "y": 3.25},
+ {"x": 1, "y": 3.25},
+ {"x": 2, "y": 3.25},
+ {"x": 3, "y": 3.25},
+
+ {"x": 0, "y": 4.25},
+ {"x": 1, "y": 4.25},
+ {"x": 2, "y": 4.25},
+ {"x": 3, "y": 4.25},
+
+ {"x": 0, "y": 5.25},
+ {"x": 1, "y": 5.25},
+ {"x": 2, "y": 5.25},
+ {"x": 3, "y": 5.25}
+ ]
+ },
+ "LAYOUT_ortho_4x6": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+ {"x": 4, "y": 0},
+ {"x": 5.25, "y": 0},
+
+ {"x": 0, "y": 1},
+ {"x": 1, "y": 1},
+ {"x": 2, "y": 1},
+ {"x": 3, "y": 1},
+ {"x": 4, "y": 1},
+ {"x": 5.25, "y": 1},
+
+ {"x": 0, "y": 2},
+ {"x": 1, "y": 2},
+ {"x": 2, "y": 2},
+ {"x": 3, "y": 2},
+ {"x": 4, "y": 2},
+ {"x": 5.25, "y": 2},
+
+ {"x": 0, "y": 3},
+ {"x": 1, "y": 3},
+ {"x": 2, "y": 3},
+ {"x": 3, "y": 3},
+ {"x": 4, "y": 3},
+ {"x": 5.25, "y": 3}
+ ]
+ },
+ "LAYOUT_numpad_6x4": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+
+ {"x": 0, "y": 1.25},
+ {"x": 1, "y": 1.25},
+ {"x": 2, "y": 1.25},
+ {"x": 3, "y": 1.25},
+
+ {"x": 0, "y": 2.25},
+ {"x": 1, "y": 2.25},
+ {"x": 2, "y": 2.25},
+
+ {"x": 0, "y": 3.25},
+ {"x": 1, "y": 3.25},
+ {"x": 2, "y": 3.25},
+ {"x": 3, "y": 2.25, "h": 2},
+
+ {"x": 0, "y": 4.25},
+ {"x": 1, "y": 4.25},
+ {"x": 2, "y": 4.25},
+
+ {"x": 0, "y": 5.25, "w": 2},
+ {"x": 2, "y": 5.25},
+ {"x": 3, "y": 4.25, "h": 2}
+ ]
+ }
+ }
+}
diff --git a/keyboards/ymdk/np21/keymaps/default/keymap.c b/keyboards/ymdk/np21/keymaps/default/keymap.c
new file mode 100644
index 0000000000..e15fb1d6eb
--- /dev/null
+++ b/keyboards/ymdk/np21/keymaps/default/keymap.c
@@ -0,0 +1,26 @@
+#include QMK_KEYBOARD_H
+
+enum layer_names {
+ _NP,
+ _BL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_NP] = LAYOUT_ortho_6x4(
+ KC_ESC, KC_TAB, KC_BSPC, MO(_BL),
+ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_P0, KC_DOT, KC_PDOT, KC_PENT
+ ),
+
+ [_BL] = LAYOUT_ortho_6x4(
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, BL_ON, _______, BL_INC,
+ _______, BL_TOGG, _______, BL_INC,
+ _______, BL_OFF, _______, BL_DEC,
+ BL_BRTG, _______, _______, BL_DEC
+ )
+};
diff --git a/keyboards/ymdk/np21/keymaps/default/readme.md b/keyboards/ymdk/np21/keymaps/default/readme.md
new file mode 100644
index 0000000000..3a4730f7e6
--- /dev/null
+++ b/keyboards/ymdk/np21/keymaps/default/readme.md
@@ -0,0 +1,26 @@
+# The default keymap for the YMDK NP21 keypad
+
+```
+Base Layer Function Layer
+ .-----. .-----.
+ | USB | | USB |
+,-------------------------------. ,-------------------------------.
+| Esc | Tab | Back | Fn | | | | |▒▒▒▒▒▒▒|
+| | | Space | | | | | |▒▒▒▒▒▒▒|
+|-------+-------+-------+-------| |-------+-------+-------+-------|
+| Num | / | * | - | | | | | |
+| Lock | | | | | | | | |
+|-------+-------+-------+-------| |-------+-------+-------+-------|
+| 7 | 8 | 9 | + | | | BL | | BL |
+| Home | Up | PgUp | | | | On | | Inc |
+|-------+-------+-------+-------| |-------+-------+-------+-------|
+| 4 | 5 | 6 | + | | | BL | | BL |
+| Left | | Right | | | | Togg | | Inc |
+|-------+-------+-------+-------| |-------+-------+-------+-------|
+| 1 | 2 | 3 | Ent | | | BL | | BL |
+| End | Down | PgDn | | | | Off | | Dec |
+|-------+-------+-------+-------| |-------+-------+-------+-------|
+| 0 | . | . | Ent | | BL | | | BL |
+| Ins | | Del | | | Brthg | | | Dec |
+`-------------------------------' `-------------------------------'
+```
diff --git a/keyboards/ymdk/np21/keymaps/via/keymap.c b/keyboards/ymdk/np21/keymaps/via/keymap.c
new file mode 100644
index 0000000000..b361414023
--- /dev/null
+++ b/keyboards/ymdk/np21/keymaps/via/keymap.c
@@ -0,0 +1,52 @@
+/* Copyright 2021 Zereef
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_6x4(
+ KC_ESC, KC_TAB, KC_BSPC, MO(1),
+ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_P0, KC_DOT, KC_PDOT, KC_PENT
+ ),
+ [1] = LAYOUT_ortho_6x4(
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, BL_ON, _______, BL_INC,
+ _______, BL_TOGG, _______, BL_INC,
+ _______, BL_OFF, _______, BL_DEC,
+ BL_BRTG, _______, _______, BL_DEC
+ ),
+ [2] = LAYOUT_ortho_6x4(
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______
+ ),
+ [3] = LAYOUT_ortho_6x4(
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/ymdk/np21/keymaps/via/rules.mk b/keyboards/ymdk/np21/keymaps/via/rules.mk
new file mode 100644
index 0000000000..36b7ba9cbc
--- /dev/null
+++ b/keyboards/ymdk/np21/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes
diff --git a/keyboards/ymdk/np21/np21.c b/keyboards/ymdk/np21/np21.c
new file mode 100644
index 0000000000..824cfb0d1a
--- /dev/null
+++ b/keyboards/ymdk/np21/np21.c
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Modified 2018 Kenneth A. <github.com/krusli>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "np21.h"
diff --git a/keyboards/ymdk/np21/np21.h b/keyboards/ymdk/np21/np21.h
new file mode 100644
index 0000000000..7434cf016d
--- /dev/null
+++ b/keyboards/ymdk/np21/np21.h
@@ -0,0 +1,64 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "quantum.h"
+
+#define XXX KC_NO
+
+#define LAYOUT_ortho_6x4( \
+ k00, k10, k20, k30, \
+ k01, k11, k21, k31, \
+ k02, k12, k22, k32, \
+ k03, k13, k23, k33, \
+ k04, k14, k24, k34, \
+ k05, k15, k25, k35 \
+) { \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k33, k34, k35 } \
+}
+
+#define LAYOUT_ortho_4x6( \
+ k05, k04, k03, k02, k01, k00, \
+ k15, k14, k13, k12, k11, k10, \
+ k25, k24, k23, k22, k21, k20, \
+ k35, k34, k33, k32, k31, k30 \
+) { \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k33, k34, k35 } \
+}
+
+#define LAYOUT_numpad_6x4( \
+ k00, k10, k20, k30, \
+ k01, k11, k21, k31, \
+ k02, k12, k22, \
+ k03, k13, k23, k32, \
+ k04, k14, k24, \
+ k05, k25, k34 \
+) { \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, XXX }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, XXX, k34, XXX } \
+}
+
+#define LAYOUT LAYOUT_ortho_4x6
diff --git a/keyboards/ymdk/np21/readme.md b/keyboards/ymdk/np21/readme.md
new file mode 100644
index 0000000000..e9eaad9b7b
--- /dev/null
+++ b/keyboards/ymdk/np21/readme.md
@@ -0,0 +1,21 @@
+# YMDK NP21
+
+![kp21 &mdash; full grid layout](https://ae01.alicdn.com/kf/HTB1d.txfHsTMeJjSszhq6AGCFXaF.jpg?size=35021&height=662&width=1000&hash=62b3a453686e2154dc51a7af67495e28)
+
+ps2avrGB based number-pad sold fully assembled by YMDK on Aliexpress.
+
+* Keyboard Maintainer: [QMK Community](https://github.com/qmk)
+* Hardware Supported: Atmega32A
+* Hardware Availability: [AliExpress](https://www.aliexpress.com/item/21-Key-NPKC-Programmable-Cherry-MX-Kailh-Gateron-Switches-Mechanical-Keyboard-Numpad-Free-shipping/32812732361.html)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make ymdk/np21:default
+
+Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
+
+ make ymdk/np21:default:flash
+
+**Reset Key**: Hold down the 'Top Left Key' (USB on top) while plugging in the keyboard.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/ymdk/np21/rules.mk b/keyboards/ymdk/np21/rules.mk
new file mode 100644
index 0000000000..7316ceff6d
--- /dev/null
+++ b/keyboards/ymdk/np21/rules.mk
@@ -0,0 +1,19 @@
+# MCU name
+MCU = atmega32a
+
+# Bootloader selection
+BOOTLOADER = bootloadhid
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+WS2812_DRIVER = i2c
+
+LAYOUTS = ortho_6x4 numpad_6x4