diff options
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(); |