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 | |
parent | 6ef13f83e2ffff5537c8565972cd007dad548b66 (diff) | |
download | qmk_firmware-4b10235f6777db3e7a7feab301542a0e78083b20.tar.gz qmk_firmware-4b10235f6777db3e7a7feab301542a0e78083b20.zip |
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
-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 000000000..dde57aafe --- /dev/null +++ b/keyboards/yd60mq/12led/config.h | |||
@@ -0,0 +1,5 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #define DEVICE_VER 0x0001 | ||
4 | |||
5 | #define RGBLED_NUM 12 | ||
diff --git a/keyboards/yd60mq/12led/readme.md b/keyboards/yd60mq/12led/readme.md new file mode 100644 index 000000000..117069061 --- /dev/null +++ b/keyboards/yd60mq/12led/readme.md | |||
@@ -0,0 +1,3 @@ | |||
1 | # YD60MQ – 12 LED | ||
2 | |||
3 | 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 000000000..e69de29bb --- /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 000000000..11ce3aeb2 --- /dev/null +++ b/keyboards/yd60mq/16led/config.h | |||
@@ -0,0 +1,5 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #define DEVICE_VER 0x0002 | ||
4 | |||
5 | #define RGBLED_NUM 16 | ||
diff --git a/keyboards/yd60mq/16led/readme.md b/keyboards/yd60mq/16led/readme.md new file mode 100644 index 000000000..a03d6259e --- /dev/null +++ b/keyboards/yd60mq/16led/readme.md | |||
@@ -0,0 +1,3 @@ | |||
1 | # YD60MQ – 16 LED | ||
2 | |||
3 | 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 000000000..e69de29bb --- /dev/null +++ b/keyboards/yd60mq/16led/rules.mk | |||
diff --git a/keyboards/yd60mq/config.h b/keyboards/yd60mq/config.h index 75e697802..26c39a5b0 100644 --- a/keyboards/yd60mq/config.h +++ b/keyboards/yd60mq/config.h | |||
@@ -5,7 +5,6 @@ | |||
5 | /* USB Device descriptor parameter */ | 5 | /* USB Device descriptor parameter */ |
6 | #define VENDOR_ID 0xFEED | 6 | #define VENDOR_ID 0xFEED |
7 | #define PRODUCT_ID 0x6060 | 7 | #define PRODUCT_ID 0x6060 |
8 | #define DEVICE_VER 0x0001 | ||
9 | #define MANUFACTURER YMDK | 8 | #define MANUFACTURER YMDK |
10 | #define PRODUCT YD60MQ | 9 | #define PRODUCT YD60MQ |
11 | #define DESCRIPTION Keyboard | 10 | #define DESCRIPTION Keyboard |
@@ -37,10 +36,8 @@ | |||
37 | /* prevent stuck modifiers */ | 36 | /* prevent stuck modifiers */ |
38 | 37 | ||
39 | #define RGB_DI_PIN E2 | 38 | #define RGB_DI_PIN E2 |
40 | #ifdef RGB_DI_PIN | ||
41 | #define RGBLIGHT_ANIMATIONS | 39 | #define RGBLIGHT_ANIMATIONS |
42 | #define RGBLED_NUM 12 | ||
43 | #define RGBLIGHT_HUE_STEP 8 | 40 | #define RGBLIGHT_HUE_STEP 8 |
44 | #define RGBLIGHT_SAT_STEP 8 | 41 | #define RGBLIGHT_SAT_STEP 8 |
45 | #define RGBLIGHT_VAL_STEP 8 | 42 | #define RGBLIGHT_VAL_STEP 8 |
46 | #endif | 43 | // RGBLED_NUM is defined in revisions |
diff --git a/keyboards/yd60mq/readme.md b/keyboards/yd60mq/readme.md index 0802c9d16..32073da63 100644 --- a/keyboards/yd60mq/readme.md +++ b/keyboards/yd60mq/readme.md | |||
@@ -5,15 +5,25 @@ | |||
5 | Customizable 60% PCB by [YMDK](https://ymdk.aliexpress.com/store/429151?spm=2114.10010108.0.0.3ab23641lIkgzm). | 5 | Customizable 60% PCB by [YMDK](https://ymdk.aliexpress.com/store/429151?spm=2114.10010108.0.0.3ab23641lIkgzm). |
6 | 6 | ||
7 | * Keyboard Maintainer: QMK Community | 7 | * Keyboard Maintainer: QMK Community |
8 | * Hardware Supported: YD60MQ PCB, ATmega32U4 | 8 | * Hardware Supported: YD60MQ PCB |
9 | * 12led (unknown revision number, has 12 RGB LEDs on the back) – _default variant_ | ||
10 | * 16led (unknown revision number, has 16 RGB LEDs on the back) | ||
9 | * Hardware Availability: [YMDK on AliExpress](https://www.aliexpress.com/i/32869207240.html) | 11 | * Hardware Availability: [YMDK on AliExpress](https://www.aliexpress.com/i/32869207240.html) |
10 | 12 | ||
11 | Make example for this keyboard (after setting up your build environment): | 13 | Make example for this keyboard (after setting up your build environment): |
12 | 14 | ||
13 | make yd60mq:default | 15 | ```sh |
16 | make yd60mq:default # builds the 12 LED variant | ||
17 | make yd60mq/12led:default # also builds the 12 LED variant | ||
18 | make yd60mq/16led:default # builds the 16 LED variant | ||
19 | ``` | ||
14 | 20 | ||
15 | The keyboard uses a DFU bootloader. To make a keymap and use dfu to flash it: | 21 | The keyboard uses a DFU bootloader. To make a keymap and use dfu to flash it: |
16 | 22 | ||
17 | make yd60mq:default:flash | 23 | ```sh |
24 | make yd60mq:default:flash # builds and flashes the 12 LED variant | ||
25 | make yd60mq/12led:default:flash # also builds and flashes the 12 LED variant | ||
26 | make yd60mq/16led:default:flash # builds and flashes the 16 LED variant | ||
27 | ``` | ||
18 | 28 | ||
19 | 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). | 29 | 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 f28f80058..98b13aca4 100644 --- a/keyboards/yd60mq/rules.mk +++ b/keyboards/yd60mq/rules.mk | |||
@@ -32,3 +32,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | |||
32 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs | 32 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs |
33 | 33 | ||
34 | LAYOUTS = 60_ansi | 34 | LAYOUTS = 60_ansi |
35 | |||
36 | DEFAULT_FOLDER = yd60mq/12led | ||
diff --git a/keyboards/yd60mq/yd60mq.c b/keyboards/yd60mq/yd60mq.c index a39af530d..bfe6b6c2d 100644 --- a/keyboards/yd60mq/yd60mq.c +++ b/keyboards/yd60mq/yd60mq.c | |||
@@ -1,10 +1,12 @@ | |||
1 | #include "yd60mq.h" | 1 | #include "yd60mq.h" |
2 | 2 | ||
3 | __attribute__((weak)) | ||
3 | void matrix_init_kb(void){ | 4 | void matrix_init_kb(void){ |
4 | setPinOutput(F4); | 5 | setPinOutput(F4); |
5 | writePinHigh(F4); | 6 | writePinHigh(F4); |
6 | } | 7 | } |
7 | 8 | ||
9 | __attribute__((weak)) | ||
8 | bool led_update_kb(led_t led_state) { | 10 | bool led_update_kb(led_t led_state) { |
9 | bool res = led_update_user(led_state); | 11 | bool res = led_update_user(led_state); |
10 | if (res) { | 12 | if (res) { |