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
This commit is contained in:
Konstantin Đorđević 2020-04-09 03:51:18 +02:00 committed by GitHub
parent 6ef13f83e2
commit 4b10235f67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 34 additions and 7 deletions

View file

@ -0,0 +1,5 @@
#pragma once
#define DEVICE_VER 0x0001
#define RGBLED_NUM 12

View file

@ -0,0 +1,3 @@
# YD60MQ 12 LED
Code specific to the YD60MQ variant with 12 RGB LEDs on the back (unknown revision number).

View file

View file

@ -0,0 +1,5 @@
#pragma once
#define DEVICE_VER 0x0002
#define RGBLED_NUM 16

View file

@ -0,0 +1,3 @@
# YD60MQ 16 LED
Code specific to the YD60MQ variant with 16 RGB LEDs on the back (unknown revision number).

View file

View file

@ -5,7 +5,6 @@
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060 #define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER YMDK #define MANUFACTURER YMDK
#define PRODUCT YD60MQ #define PRODUCT YD60MQ
#define DESCRIPTION Keyboard #define DESCRIPTION Keyboard
@ -37,10 +36,8 @@
/* prevent stuck modifiers */ /* prevent stuck modifiers */
#define RGB_DI_PIN E2 #define RGB_DI_PIN E2
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 12
#define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
#endif // RGBLED_NUM is defined in revisions

View file

@ -5,15 +5,25 @@
Customizable 60% PCB by [YMDK](https://ymdk.aliexpress.com/store/429151?spm=2114.10010108.0.0.3ab23641lIkgzm). Customizable 60% PCB by [YMDK](https://ymdk.aliexpress.com/store/429151?spm=2114.10010108.0.0.3ab23641lIkgzm).
* Keyboard Maintainer: QMK Community * 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) * Hardware Availability: [YMDK on AliExpress](https://www.aliexpress.com/i/32869207240.html)
Make example for this keyboard (after setting up your build environment): 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: 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). 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).

View file

@ -32,3 +32,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs HD44780_ENABLE = no # Enable support for HD44780 based LCDs
LAYOUTS = 60_ansi LAYOUTS = 60_ansi
DEFAULT_FOLDER = yd60mq/12led

View file

@ -1,10 +1,12 @@
#include "yd60mq.h" #include "yd60mq.h"
__attribute__((weak))
void matrix_init_kb(void){ void matrix_init_kb(void){
setPinOutput(F4); setPinOutput(F4);
writePinHigh(F4); writePinHigh(F4);
} }
__attribute__((weak))
bool led_update_kb(led_t led_state) { bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state); bool res = led_update_user(led_state);
if (res) { if (res) {