Skip to content

Commit

Permalink
Set the correct RGB LED count on YD60MQ (qmk#8629)
Browse files Browse the repository at this point in the history
* Fix RGB LED count on YD60MQ

* Split YD60MQ into 12-LED and 16-LED revisions

* Update readmes

* Make 12led the default version

* Readd base rules.mk, version→variant in readme

* Add syntax highlighting to code blocks in readme
  • Loading branch information
vomindoraan authored and turky committed Jun 13, 2020
1 parent afa9d28 commit 8591504
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 7 deletions.
5 changes: 5 additions & 0 deletions keyboards/yd60mq/12led/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

#define DEVICE_VER 0x0001

#define RGBLED_NUM 12
3 changes: 3 additions & 0 deletions keyboards/yd60mq/12led/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# YD60MQ – 12 LED

Code specific to the YD60MQ variant with 12 RGB LEDs on the back (unknown revision number).
Empty file added keyboards/yd60mq/12led/rules.mk
Empty file.
5 changes: 5 additions & 0 deletions keyboards/yd60mq/16led/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

#define DEVICE_VER 0x0002

#define RGBLED_NUM 16
3 changes: 3 additions & 0 deletions keyboards/yd60mq/16led/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# YD60MQ – 16 LED

Code specific to the YD60MQ variant with 16 RGB LEDs on the back (unknown revision number).
Empty file added keyboards/yd60mq/16led/rules.mk
Empty file.
5 changes: 1 addition & 4 deletions keyboards/yd60mq/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER YMDK
#define PRODUCT YD60MQ
#define DESCRIPTION Keyboard
Expand Down Expand Up @@ -37,10 +36,8 @@
/* prevent stuck modifiers */

#define RGB_DI_PIN E2
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 12
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif
// RGBLED_NUM is defined in revisions
16 changes: 13 additions & 3 deletions keyboards/yd60mq/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,25 @@
Customizable 60% PCB by [YMDK](https://ymdk.aliexpress.com/store/429151?spm=2114.10010108.0.0.3ab23641lIkgzm).

* Keyboard Maintainer: QMK Community
* Hardware Supported: YD60MQ PCB, ATmega32U4
* Hardware Supported: YD60MQ PCB
* 12led (unknown revision number, has 12 RGB LEDs on the back) – _default variant_
* 16led (unknown revision number, has 16 RGB LEDs on the back)
* Hardware Availability: [YMDK on AliExpress](https://www.aliexpress.com/i/32869207240.html)

Make example for this keyboard (after setting up your build environment):

make yd60mq:default
```sh
make yd60mq:default # builds the 12 LED variant
make yd60mq/12led:default # also builds the 12 LED variant
make yd60mq/16led:default # builds the 16 LED variant
```

The keyboard uses a DFU bootloader. To make a keymap and use dfu to flash it:

make yd60mq:default:flash
```sh
make yd60mq:default:flash # builds and flashes the 12 LED variant
make yd60mq/12led:default:flash # also builds and flashes the 12 LED variant
make yd60mq/16led:default:flash # builds and flashes the 16 LED variant
```

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).
2 changes: 2 additions & 0 deletions keyboards/yd60mq/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs

LAYOUTS = 60_ansi

DEFAULT_FOLDER = yd60mq/12led
2 changes: 2 additions & 0 deletions keyboards/yd60mq/yd60mq.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#include "yd60mq.h"

__attribute__((weak))
void matrix_init_kb(void){
setPinOutput(F4);
writePinHigh(F4);
}

__attribute__((weak))
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if (res) {
Expand Down

0 comments on commit 8591504

Please sign in to comment.