aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Aloysius <krusli@users.noreply.github.com>2019-05-21 05:43:29 +0700
committerDrashna Jaelre <drashna@live.com>2019-05-20 15:43:29 -0700
commit57f5cd3ca7903a8736f79d3d08a7dc6dc75793b3 (patch)
treea5a904c2951eb742fa55b3ec4688b8baac68394f
parent843c67d805b72e9bbfaa14f0ef93f1506c1fcc98 (diff)
downloadqmk_firmware-57f5cd3ca7903a8736f79d3d08a7dc6dc75793b3.tar.gz
qmk_firmware-57f5cd3ca7903a8736f79d3d08a7dc6dc75793b3.zip
[Keyboard] YD60MQ support (#5911)
* Keep ASCII art consistent with keymap * Possible fix for xyverz ortho keymap: define RGBLED_NUM * Update DZ60 keymap; TODO store old keymap under different directory? * Change RGUI to RALT because 7u spacebar is too long * Save old bottom row keymap * Update Iris keymap: replace backslash with grv * Add ortho_4x12 layout * Added Delete key to Iris keymap * Move delete key * Oh look a new keyboard * ortho4x12: get an adjust layer back * Remove jj40 keymap, add custom power draw #define * Set WhiteFox to advertise only 100mA of power draw * Update WhiteFox keymap * Update WF keymap (2) * Remove lets_split keymap, update community krusli keymap * Add #define for BACKLIGHT_LEVELS (unused) * Update Whitefox keymap * Add YD60 from auto-generated kbfirmware files * Bring files up to speed with new standards * Fix: KEYMAP -> LAYOUT * Fix keymap differences (DZ60 -> YD60) * Update keymap * Update README * Fix RShift position * Specify that the port is for the YD60MQ variant * Update keyboards/iris/keymaps/krusli/keymap.c Co-Authored-By: fauxpark <fauxpark@gmail.com> * Fix Iris and Let's Split keymaps * Remove unused keymap file * Use #include QMK_KEYBOARD_H * Add atmel-dfu selection to yd60 * Rename dir to YD60MQ, update definitions * Use new convenience macros/functions for led_set_user * Use #pragma once * Change all ?= to = in rules.mk * Use pragma once for yd60mq.h * Take out DZ60 and Iris changes * Remove now-removed Iris folder * Revert adding ortho_4x12 * Revert on xyverz ortho_4x12 keymap * Undo deleting JJ40 keymap files * Don't revert beyond upstream jj40 state * Extra files from earlier commit is to be deleted * Remove WhiteFox keymap not in upstream yet * Re-add my Let's Split keymap * Revert keymap changes * Cleanup: indentation * Update keyboards/yd60mq/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/yd60mq/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Cleanup & move kb backlighting code to yd60mq.c * Update README, rename to lowercase * Update README: rename to lowercase * Update README with links and picture of PCB * Remove PREVENT_STUCK_MODIFIERS Co-Authored-By: Drashna Jaelre <drashna@live.com>
-rw-r--r--keyboards/yd60mq/config.h47
-rw-r--r--keyboards/yd60mq/keymaps/default/keymap.c25
-rw-r--r--keyboards/yd60mq/keymaps/krusli/keymap.c19
-rw-r--r--keyboards/yd60mq/readme.md20
-rw-r--r--keyboards/yd60mq/rules.mk61
-rw-r--r--keyboards/yd60mq/yd60mq.c13
-rw-r--r--keyboards/yd60mq/yd60mq.h18
7 files changed, 203 insertions, 0 deletions
diff --git a/keyboards/yd60mq/config.h b/keyboards/yd60mq/config.h
new file mode 100644
index 000000000..2a899fa3e
--- /dev/null
+++ b/keyboards/yd60mq/config.h
@@ -0,0 +1,47 @@
1#pragma once
2
3#include "config_common.h"
4
5/* USB Device descriptor parameter */
6#define VENDOR_ID 0xFEED
7#define PRODUCT_ID 0x6060
8#define DEVICE_VER 0x0001
9#define MANUFACTURER YMDK
10#define PRODUCT YD60MQ
11#define DESCRIPTION Keyboard
12
13/* key matrix size */
14#define MATRIX_ROWS 5
15#define MATRIX_COLS 15
16
17/* key matrix pins */
18#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
19#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, F7, B5, B4, D7, D6, B3, B2 }
20#define UNUSED_PINS
21
22/* COL2ROW or ROW2COL */
23#define DIODE_DIRECTION COL2ROW
24
25/* number of backlight levels */
26#define BACKLIGHT_PIN B7
27#ifdef BACKLIGHT_PIN
28#define BACKLIGHT_LEVELS 5
29#endif
30
31/* Set 0 if debouncing isn't needed */
32#define DEBOUNCING_DELAY 5
33
34/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
35#define LOCKING_SUPPORT_ENABLE
36
37/* prevent stuck modifiers */
38
39#define RGB_DI_PIN E2
40#ifdef RGB_DI_PIN
41#define RGBLIGHT_ANIMATIONS
42#define RGBLED_NUM 12
43#define RGBLIGHT_HUE_STEP 8
44#define RGBLIGHT_SAT_STEP 8
45#define RGBLIGHT_VAL_STEP 8
46#endif
47
diff --git a/keyboards/yd60mq/keymaps/default/keymap.c b/keyboards/yd60mq/keymaps/default/keymap.c
new file mode 100644
index 000000000..a5a0145ee
--- /dev/null
+++ b/keyboards/yd60mq/keymaps/default/keymap.c
@@ -0,0 +1,25 @@
1#include QMK_KEYBOARD_H
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4
5 LAYOUT(
6 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
7 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
8 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
9 KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL,
10 KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
11
12 LAYOUT(
13 RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
14 KC_TRNS, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
15 KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
16 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
17 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
18
19};
20
21void matrix_init_user(void) {
22}
23
24void matrix_scan_user(void) {
25}
diff --git a/keyboards/yd60mq/keymaps/krusli/keymap.c b/keyboards/yd60mq/keymaps/krusli/keymap.c
new file mode 100644
index 000000000..d9c276565
--- /dev/null
+++ b/keyboards/yd60mq/keymaps/krusli/keymap.c
@@ -0,0 +1,19 @@
1#include QMK_KEYBOARD_H
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4
5 LAYOUT(
6 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
7 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
8 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
9 KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, KC_RSFT, MO(1),
10 KC_LCTL, KC_LALT, KC_LGUI, _______, KC_SPC, _______, _______, KC_RALT, _______, KC_RGUI, KC_RCTL),
11
12 LAYOUT(
13 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
14 KC_CAPS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, RESET,
15 _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______,
16 _______, KC_NO, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______,
17 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)
18
19};
diff --git a/keyboards/yd60mq/readme.md b/keyboards/yd60mq/readme.md
new file mode 100644
index 000000000..78f442d88
--- /dev/null
+++ b/keyboards/yd60mq/readme.md
@@ -0,0 +1,20 @@
1YD60MQ
2======
3
4![YD60MQ PCB](https://ae01.alicdn.com/kf/HTB1PVQ2X_HuK1RkSndVq6xVwpXaO.jpg)
5
6Customizable 60% PCB by [YMDK](https://ymdk.aliexpress.com/store/429151?spm=2114.10010108.0.0.3ab23641lIkgzm).
7
8Keyboard Maintainer: QMK Community
9Hardware Supported: YD60MQ
10Hardware Availability: YMDK - [AliExpress](https://www.aliexpress.com/item/YMDK-60-YD60MQ-QMK-Programmable-Underglow-RGB-Led-PCB-Plate-Stabilizers-For-DIY-Mechanical-Keyboard-Interchange/32869207240.html)
11
12Make example for this keyboard (after setting up your build environment):
13
14 make yd60mq:default
15
16The keyboard uses a DFU bootloader. To make a keymap and use dfu-util to flash it:
17
18 make yd60mq:default:dfu
19
20See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk
new file mode 100644
index 000000000..2a8963011
--- /dev/null
+++ b/keyboards/yd60mq/rules.mk
@@ -0,0 +1,61 @@
1# MCU name
2MCU = atmega32u4
3
4# Processor frequency.
5# This will define a symbol, F_CPU, in all source code files equal to the
6# processor frequency in Hz. You can then use this symbol in your source code to
7# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
8# automatically to create a 32-bit value in your source code.
9#
10# This will be an integer division of F_USB below, as it is sourced by
11# F_USB after it has run through any CPU prescalers. Note that this value
12# does not *change* the processor frequency - it should merely be updated to
13# reflect the processor speed set externally so that the code can use accurate
14# software delays.
15F_CPU = 16000000
16
17#
18# LUFA specific
19#
20# Target architecture (see library "Board Types" documentation).
21ARCH = AVR8
22
23# Input clock frequency.
24# This will define a symbol, F_USB, in all source code files equal to the
25# input clock frequency (before any prescaling is performed) in Hz. This value may
26# differ from F_CPU if prescaling is used on the latter, and is required as the
27# raw input clock is fed directly to the PLL sections of the AVR for high speed
28# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
29# at the end, this will be done automatically to create a 32-bit value in your
30# source code.
31#
32# If no clock division is performed on the input clock inside the AVR (via the
33# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
34F_USB = $(F_CPU)
35
36# Interrupt driven control endpoint task(+60)
37OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
38
39# Bootloader selection
40# Teensy halfkay
41# Pro Micro caterina
42# Atmel DFU atmel-dfu
43# LUFA DFU lufa-dfu
44# QMK DFU qmk-dfu
45# atmega32a bootloadHID
46BOOTLOADER = atmel-dfu
47
48
49# Build Options
50# comment out to disable the options.
51#
52BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
53MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
54EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
55CONSOLE_ENABLE = no # Console for debug(+400)
56COMMAND_ENABLE = no # Commands for debug and configuration
57SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
58NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
59BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
60AUDIO_ENABLE = no
61RGBLIGHT_ENABLE = yes
diff --git a/keyboards/yd60mq/yd60mq.c b/keyboards/yd60mq/yd60mq.c
new file mode 100644
index 000000000..96306d6a6
--- /dev/null
+++ b/keyboards/yd60mq/yd60mq.c
@@ -0,0 +1,13 @@
1#include "yd60mq.h"
2
3void led_set_kb(uint8_t usb_led) {
4 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
5 setPinOutput(F4);
6 writePinLow(F4);
7 } else {
8 setPinInput(F4);
9 writePinLow(F4);
10 }
11
12 led_set_user(usb_led);
13}
diff --git a/keyboards/yd60mq/yd60mq.h b/keyboards/yd60mq/yd60mq.h
new file mode 100644
index 000000000..5f5d8a242
--- /dev/null
+++ b/keyboards/yd60mq/yd60mq.h
@@ -0,0 +1,18 @@
1#pragma once
2
3#include "quantum.h"
4
5#define LAYOUT( \
6 K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
7 K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
8 K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
9 K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \
10 K400, K401, K402, K403, K407, K408, K409, K410, K411, K412, K413 \
11) { \
12 { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
13 { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \
14 { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
15 { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
16 { K400, K401, K402, K403, KC_NO, KC_NO, KC_NO, K407, K408, K409, K410, K411, K412, K413, KC_NO } \
17}
18