diff options
| author | Patrick Fruh <809734+kaeltis@users.noreply.github.com> | 2020-01-10 15:17:45 +0100 |
|---|---|---|
| committer | Joel Challis <git@zvecr.com> | 2020-01-10 14:17:45 +0000 |
| commit | 7d7bb5bf82cd6527ec779254ccc21270f3eeecb9 (patch) | |
| tree | f78b14a563a4bc3e68872ee61a1051ff3c8c9690 | |
| parent | b1b52c37c7e6f198052aa7f1da77db73f893ac9b (diff) | |
| download | qmk_firmware-7d7bb5bf82cd6527ec779254ccc21270f3eeecb9.tar.gz qmk_firmware-7d7bb5bf82cd6527ec779254ccc21270f3eeecb9.zip | |
added ymdk ymd09 keyboard (#7831)
* added ymdk ymd09 keyboard
* lowercase github username
* change rgb keymap to make more sense
* fixed number of LEDs
* remove configuration for non-existant backlight
* use official template and change file permissions
* disable unnecessary nkro
* Apply suggestions from code review
Co-Authored-By: Joel Challis <git@zvecr.com>
* with easy reset via bootmagic lite, remove RESET from layout
Co-authored-by: Joel Challis <git@zvecr.com>
| -rw-r--r-- | keyboards/ymdk/ymd09/README.md | 15 | ||||
| -rw-r--r-- | keyboards/ymdk/ymd09/config.h | 66 | ||||
| -rw-r--r-- | keyboards/ymdk/ymd09/info.json | 23 | ||||
| -rw-r--r-- | keyboards/ymdk/ymd09/keymaps/default/keymap.c | 13 | ||||
| -rw-r--r-- | keyboards/ymdk/ymd09/rules.mk | 32 | ||||
| -rw-r--r-- | keyboards/ymdk/ymd09/ymd09.c | 1 | ||||
| -rw-r--r-- | keyboards/ymdk/ymd09/ymd09.h | 13 |
7 files changed, 163 insertions, 0 deletions
diff --git a/keyboards/ymdk/ymd09/README.md b/keyboards/ymdk/ymd09/README.md new file mode 100644 index 000000000..dce883c1f --- /dev/null +++ b/keyboards/ymdk/ymd09/README.md | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # YMD09 | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A 9-key macropad by [YMDK](https://ymdk.aliexpress.com/store/429151) with per-key RGB lighting. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [Patrick Fruh](https://github.com/kaeltis) | ||
| 8 | * Hardware Supported: YMD09 | ||
| 9 | * Hardware Availability: [AliExpress](https://www.aliexpress.com/i/4000510880374.html) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make ymdk/ymd09:default | ||
| 14 | |||
| 15 | 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/ymd09/config.h b/keyboards/ymdk/ymd09/config.h new file mode 100644 index 000000000..b7e5539df --- /dev/null +++ b/keyboards/ymdk/ymd09/config.h | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Patrick Fruh | ||
| 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 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0xFEED | ||
| 24 | #define PRODUCT_ID 0x0909 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER YMDK | ||
| 27 | #define PRODUCT YMD09 | ||
| 28 | #define DESCRIPTION 9-Key Macropad | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 3 | ||
| 32 | #define MATRIX_COLS 3 | ||
| 33 | |||
| 34 | /* Keyboard Matrix Assignments */ | ||
| 35 | #define MATRIX_ROW_PINS { F5, F4, F1 } | ||
| 36 | #define MATRIX_COL_PINS { D6, D2, D1 } | ||
| 37 | #define UNUSED_PINS | ||
| 38 | |||
| 39 | /* COL2ROW, ROW2COL*/ | ||
| 40 | #define DIODE_DIRECTION ROW2COL | ||
| 41 | |||
| 42 | #define RGB_DI_PIN E2 | ||
| 43 | #ifdef RGB_DI_PIN | ||
| 44 | #define RGBLED_NUM 9 | ||
| 45 | #define RGBLIGHT_HUE_STEP 8 | ||
| 46 | #define RGBLIGHT_SAT_STEP 8 | ||
| 47 | #define RGBLIGHT_VAL_STEP 8 | ||
| 48 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 49 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 50 | /*== all animations enable ==*/ | ||
| 51 | #define RGBLIGHT_ANIMATIONS | ||
| 52 | #endif | ||
| 53 | |||
| 54 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 55 | #define DEBOUNCE 5 | ||
| 56 | |||
| 57 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 58 | #define LOCKING_SUPPORT_ENABLE | ||
| 59 | /* Locking resynchronize hack */ | ||
| 60 | #define LOCKING_RESYNC_ENABLE | ||
| 61 | |||
| 62 | /* disable these deprecated features by default */ | ||
| 63 | #ifndef LINK_TIME_OPTIMIZATION_ENABLE | ||
| 64 | #define NO_ACTION_MACRO | ||
| 65 | #define NO_ACTION_FUNCTION | ||
| 66 | #endif | ||
diff --git a/keyboards/ymdk/ymd09/info.json b/keyboards/ymdk/ymd09/info.json new file mode 100644 index 000000000..cb11ac97f --- /dev/null +++ b/keyboards/ymdk/ymd09/info.json | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "YMD09", | ||
| 3 | "url": "https://www.aliexpress.com/item/4000510880374.html", | ||
| 4 | "maintainer": "kaeltis", | ||
| 5 | "width": 3, | ||
| 6 | "height": 3, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "key_count": 9, | ||
| 10 | "layout": [ | ||
| 11 | {"label": "7", "x": 0, "y": 0}, | ||
| 12 | {"label": "8", "x": 1, "y": 0}, | ||
| 13 | {"label": "9", "x": 2, "y": 0}, | ||
| 14 | {"label": "4", "x": 0, "y": 1}, | ||
| 15 | {"label": "5", "x": 1, "y": 1}, | ||
| 16 | {"label": "6", "x": 2, "y": 1}, | ||
| 17 | {"label": "1", "x": 0, "y": 2}, | ||
| 18 | {"label": "2", "x": 1, "y": 2}, | ||
| 19 | {"label": "3", "x": 2, "y": 2} | ||
| 20 | ] | ||
| 21 | } | ||
| 22 | } | ||
| 23 | } | ||
diff --git a/keyboards/ymdk/ymd09/keymaps/default/keymap.c b/keyboards/ymdk/ymd09/keymaps/default/keymap.c new file mode 100644 index 000000000..330e41db6 --- /dev/null +++ b/keyboards/ymdk/ymd09/keymaps/default/keymap.c | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 4 | |||
| 5 | [0] = LAYOUT(KC_KP_7, KC_KP_8, KC_KP_9, | ||
| 6 | KC_KP_4, LT(1, KC_KP_5), KC_KP_6, | ||
| 7 | KC_KP_1, KC_KP_2, KC_KP_3), | ||
| 8 | |||
| 9 | [1] = LAYOUT(RGB_RMOD, RGB_VAI, RGB_MOD, | ||
| 10 | RGB_HUI, KC_TRNS, RGB_SAI, | ||
| 11 | RGB_HUD, RGB_VAD, RGB_SAD), | ||
| 12 | |||
| 13 | }; | ||
diff --git a/keyboards/ymdk/ymd09/rules.mk b/keyboards/ymdk/ymd09/rules.mk new file mode 100644 index 000000000..171e9b1fc --- /dev/null +++ b/keyboards/ymdk/ymd09/rules.mk | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | # Teensy halfkay | ||
| 6 | # Pro Micro caterina | ||
| 7 | # Atmel DFU atmel-dfu | ||
| 8 | # LUFA DFU lufa-dfu | ||
| 9 | # QMK DFU qmk-dfu | ||
| 10 | # ATmega32A bootloadHID | ||
| 11 | # ATmega328P USBasp | ||
| 12 | BOOTLOADER = atmel-dfu | ||
| 13 | |||
| 14 | # Build Options | ||
| 15 | # change yes to no to disable | ||
| 16 | # | ||
| 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 18 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 19 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 20 | CONSOLE_ENABLE = no # Console for debug | ||
| 21 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 22 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 23 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 24 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 25 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 26 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 27 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 28 | MIDI_ENABLE = no # MIDI support | ||
| 29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 30 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
| 32 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs | ||
diff --git a/keyboards/ymdk/ymd09/ymd09.c b/keyboards/ymdk/ymd09/ymd09.c new file mode 100644 index 000000000..179c0c6b3 --- /dev/null +++ b/keyboards/ymdk/ymd09/ymd09.c | |||
| @@ -0,0 +1 @@ | |||
| #include "ymd09.h" | |||
diff --git a/keyboards/ymdk/ymd09/ymd09.h b/keyboards/ymdk/ymd09/ymd09.h new file mode 100644 index 000000000..76cb5d3f0 --- /dev/null +++ b/keyboards/ymdk/ymd09/ymd09.h | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "quantum.h" | ||
| 4 | |||
| 5 | #define LAYOUT( \ | ||
| 6 | K00, K01, K02, \ | ||
| 7 | K10, K11, K12, \ | ||
| 8 | K20, K21, K22 \ | ||
| 9 | ) { \ | ||
| 10 | { K00, K01, K02 }, \ | ||
| 11 | { K10, K11, K12 }, \ | ||
| 12 | { K20, K21, K22 } \ | ||
| 13 | } | ||
