From 2e23689b8e3222982082c1f5a4f8ce7686f9658b Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 23 Nov 2016 18:52:02 -0500 Subject: converted to new format --- quantum/rgblight.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'quantum/rgblight.c') diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 00620da58e..bb03d6e913 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -183,6 +183,19 @@ void rgblight_init(void) { } } +void rgblight_update_dword(uint32_t dword) { + rgblight_config.raw = dword; + eeconfig_update_rgblight(rgblight_config.raw); + if (rgblight_config.enable) + rgblight_mode(rgblight_config.mode); + else { + #ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_disable(); + #endif + rgblight_set(); + } +} + void rgblight_increase(void) { uint8_t mode = 0; if (rgblight_config.mode < RGBLIGHT_MODES) { -- cgit v1.2.3