aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2020-10-02 11:10:08 +0100
committerfishsoupisgood <github@madingley.org>2020-10-02 11:10:08 +0100
commitee079a41f1450ef567e15699275596ebe058236a (patch)
tree225f59e41a436fc3b22cbfe04e214a6e371e82f2 /keyboards
parent9cd522d3814baf2fd12839c5e5ff2a98b4d823b4 (diff)
downloadfirmware-ee079a41f1450ef567e15699275596ebe058236a.tar.gz
firmware-ee079a41f1450ef567e15699275596ebe058236a.tar.bz2
firmware-ee079a41f1450ef567e15699275596ebe058236a.zip
async handing of colourHEADmaster
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/ymdk/ymd09_32a/ymd09_32a.c12
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();