summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-11-23 18:52:02 -0500
committerJack Humbert <jack.humb@gmail.com>2016-11-23 18:52:02 -0500
commit2e23689b8e3222982082c1f5a4f8ce7686f9658b (patch)
tree397456339b357744d7d59d13b32055e2c9881f63 /quantum
parent3d7aaa31e41a9c96e785b0c089d74dfda525dfbe (diff)
converted to new format
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgblight.c13
-rw-r--r--quantum/rgblight.h1
2 files changed, 14 insertions, 0 deletions
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) {
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index a3673348e7..28a410e480 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -65,6 +65,7 @@ void rgblight_enable(void);
void rgblight_step(void);
void rgblight_mode(uint8_t mode);
void rgblight_set(void);
+void rgblight_update_dword(uint32_t dword);
void rgblight_increase_hue(void);
void rgblight_decrease_hue(void);
void rgblight_increase_sat(void);