diff options
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/rgblight.c | 13 | ||||
| -rw-r--r-- | quantum/rgblight.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 00620da58..bb03d6e91 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
| @@ -183,6 +183,19 @@ void rgblight_init(void) { | |||
| 183 | } | 183 | } |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | void rgblight_update_dword(uint32_t dword) { | ||
| 187 | rgblight_config.raw = dword; | ||
| 188 | eeconfig_update_rgblight(rgblight_config.raw); | ||
| 189 | if (rgblight_config.enable) | ||
| 190 | rgblight_mode(rgblight_config.mode); | ||
| 191 | else { | ||
| 192 | #ifdef RGBLIGHT_ANIMATIONS | ||
| 193 | rgblight_timer_disable(); | ||
| 194 | #endif | ||
| 195 | rgblight_set(); | ||
| 196 | } | ||
| 197 | } | ||
| 198 | |||
| 186 | void rgblight_increase(void) { | 199 | void rgblight_increase(void) { |
| 187 | uint8_t mode = 0; | 200 | uint8_t mode = 0; |
| 188 | if (rgblight_config.mode < RGBLIGHT_MODES) { | 201 | if (rgblight_config.mode < RGBLIGHT_MODES) { |
diff --git a/quantum/rgblight.h b/quantum/rgblight.h index a3673348e..28a410e48 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h | |||
| @@ -65,6 +65,7 @@ void rgblight_enable(void); | |||
| 65 | void rgblight_step(void); | 65 | void rgblight_step(void); |
| 66 | void rgblight_mode(uint8_t mode); | 66 | void rgblight_mode(uint8_t mode); |
| 67 | void rgblight_set(void); | 67 | void rgblight_set(void); |
| 68 | void rgblight_update_dword(uint32_t dword); | ||
| 68 | void rgblight_increase_hue(void); | 69 | void rgblight_increase_hue(void); |
| 69 | void rgblight_decrease_hue(void); | 70 | void rgblight_decrease_hue(void); |
| 70 | void rgblight_increase_sat(void); | 71 | void rgblight_increase_sat(void); |
