diff options
author | fishsoupisgood <github@madingley.org> | 2020-10-02 11:10:08 +0100 |
---|---|---|
committer | fishsoupisgood <github@madingley.org> | 2020-10-02 11:10:08 +0100 |
commit | ee079a41f1450ef567e15699275596ebe058236a (patch) | |
tree | 225f59e41a436fc3b22cbfe04e214a6e371e82f2 /keyboards | |
parent | 9cd522d3814baf2fd12839c5e5ff2a98b4d823b4 (diff) | |
download | firmware-ee079a41f1450ef567e15699275596ebe058236a.tar.gz firmware-ee079a41f1450ef567e15699275596ebe058236a.tar.bz2 firmware-ee079a41f1450ef567e15699275596ebe058236a.zip |
Diffstat (limited to 'keyboards')
-rw-r--r-- | keyboards/ymdk/ymd09_32a/ymd09_32a.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/keyboards/ymdk/ymd09_32a/ymd09_32a.c b/keyboards/ymdk/ymd09_32a/ymd09_32a.c index 870593e6a..62487e017 100644 --- a/keyboards/ymdk/ymd09_32a/ymd09_32a.c +++ b/keyboards/ymdk/ymd09_32a/ymd09_32a.c @@ -16,6 +16,7 @@ */ #include "ymd09_32a.h" +static int rgb_update=0; void raw_hid_receive( uint8_t *data, uint8_t length ) { @@ -23,12 +24,19 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) switch ( data[0] ) { case RAW_COMMAND_CHANGE_COLOR: // 0x05 0x04 0xLL 0xRR 0xGG 0xBB -// rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - rgblight_setrgb_at(data[2],data[3],data[4],data[1]); + rgblight_setrgb_at_noupdate(data[2],data[3],data[4],data[1]); + rgb_update=1; break; } } +void raw_hid_dispatch(void) +{ + if (!rgb_update) return; + rgb_update = 0; + rgblight_set(); +} + void keyboard_pre_init_kb(void) { led_init_ports(); keyboard_pre_init_user(); |