diff options
author | Konstantin Đorđević <vomindoraan@gmail.com> | 2020-04-09 03:51:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-08 18:51:18 -0700 |
commit | 4b10235f6777db3e7a7feab301542a0e78083b20 (patch) | |
tree | c1b5dd84ba93280c957ae5c21046c14f6f948a87 /keyboards/yd60mq | |
parent | 6ef13f83e2ffff5537c8565972cd007dad548b66 (diff) |
Set the correct RGB LED count on YD60MQ (#8629)
* 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
Diffstat (limited to 'keyboards/yd60mq')
-rw-r--r-- | keyboards/yd60mq/12led/config.h | 5 | ||||
-rw-r--r-- | keyboards/yd60mq/12led/readme.md | 3 | ||||
-rw-r--r-- | keyboards/yd60mq/12led/rules.mk | 0 | ||||
-rw-r--r-- | keyboards/yd60mq/16led/config.h | 5 | ||||
-rw-r--r-- | keyboards/yd60mq/16led/readme.md | 3 | ||||
-rw-r--r-- | keyboards/yd60mq/16led/rules.mk | 0 | ||||
-rw-r--r-- | keyboards/yd60mq/config.h | 5 | ||||
-rw-r--r-- | keyboards/yd60mq/readme.md | 16 | ||||
-rw-r--r-- | keyboards/yd60mq/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/yd60mq/yd60mq.c | 2 |
10 files changed, 34 insertions, 7 deletions
diff --git a/keyboards/yd60mq/12led/config.h b/keyboards/yd60mq/12led/config.h new file mode 100644 index 0000000000..dde57aafec --- /dev/null +++ b/keyboards/yd60mq/12led/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define DEVICE_VER 0x0001 + +#define RGBLED_NUM 12 diff --git a/keyboards/yd60mq/12led/readme.md b/keyboards/yd60mq/12led/readme.md new file mode 100644 index 0000000000..1170690615 --- /dev/null +++ b/keyboards/yd60mq/12led/readme.md @@ -0,0 +1,3 @@ +# YD60MQ – 12 LED + +Code specific to the YD60MQ variant with 12 RGB LEDs on the back (unknown revision number). diff --git a/keyboards/yd60mq/12led/rules.mk b/keyboards/yd60mq/12led/rules.mk new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/yd60mq/12led/rules.mk diff --git a/keyboards/yd60mq/16led/config.h b/keyboards/yd60mq/16led/config.h new file mode 100644 index 0000000000..11ce3aeb27 --- /dev/null +++ b/keyboards/yd60mq/16led/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define DEVICE_VER 0x0002 + +#define RGBLED_NUM 16 diff --git a/keyboards/yd60mq/16led/readme.md b/keyboards/yd60mq/16led/readme.md new file mode 100644 index 0000000000..a03d6259e4 --- /dev/null +++ b/keyboards/yd60mq/16led/readme.md @@ -0,0 +1,3 @@ +# YD60MQ – 16 LED + +Code specific to the YD60MQ variant with 16 RGB LEDs on the back (unknown revision number). diff --git a/keyboards/yd60mq/16led/rules.mk b/keyboards/yd60mq/16led/rules.mk new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/yd60mq/16led/rules.mk diff --git a/keyboards/yd60mq/config.h b/keyboards/yd60mq/config.h index 75e697802b..26c39a5b02 100644 --- a/keyboards/yd60mq/config.h +++ b/keyboards/yd60mq/config.h @@ -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 @@ -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 diff --git a/keyboards/yd60mq/readme.md b/keyboards/yd60mq/readme.md index 0802c9d16f..32073da631 100644 --- a/keyboards/yd60mq/readme.md +++ b/keyboards/yd60mq/readme.md @@ -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). diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk index f28f800582..98b13aca43 100644 --- a/keyboards/yd60mq/rules.mk +++ b/keyboards/yd60mq/rules.mk @@ -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 diff --git a/keyboards/yd60mq/yd60mq.c b/keyboards/yd60mq/yd60mq.c index a39af530d7..bfe6b6c2de 100644 --- a/keyboards/yd60mq/yd60mq.c +++ b/keyboards/yd60mq/yd60mq.c @@ -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) { |