diff options
| author | Len Trigg <lenbok@gmail.com> | 2019-03-16 09:46:49 +1300 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-03-15 13:46:49 -0700 |
| commit | 9c4424ae2cd86002cd2f4140eff7108212ef884e (patch) | |
| tree | 02885c02070df4a3f7ee0feb36a28123faf425f0 /quantum/rgblight.c | |
| parent | fabdb3c4e8ce4659539a2b0fa4cafc56a07d6c2d (diff) | |
| download | qmk_firmware-9c4424ae2cd86002cd2f4140eff7108212ef884e.tar.gz qmk_firmware-9c4424ae2cd86002cd2f4140eff7108212ef884e.zip | |
rgblight split transfer non-eeprom config (#5396)
* Make rgblight_update_dword not update eeprom (we already have
eeconfig_update_rgblight for that).
Make split i2c keyboards transfer active rgblight config rather than
eeprom saved version of rgblight config, enabling runtime changes
that aren't persisted to eeprom.
* prev_level and prev_rgb only store successfully transmitted values
Diffstat (limited to 'quantum/rgblight.c')
| -rw-r--r-- | quantum/rgblight.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 52e0be8ba..119ca1b9e 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
| @@ -225,11 +225,14 @@ void rgblight_init(void) { | |||
| 225 | 225 | ||
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | uint32_t rgblight_read_dword(void) { | ||
| 229 | return rgblight_config.raw; | ||
| 230 | } | ||
| 231 | |||
| 228 | void rgblight_update_dword(uint32_t dword) { | 232 | void rgblight_update_dword(uint32_t dword) { |
| 229 | rgblight_config.raw = dword; | 233 | rgblight_config.raw = dword; |
| 230 | eeconfig_update_rgblight(rgblight_config.raw); | ||
| 231 | if (rgblight_config.enable) | 234 | if (rgblight_config.enable) |
| 232 | rgblight_mode(rgblight_config.mode); | 235 | rgblight_mode_noeeprom(rgblight_config.mode); |
| 233 | else { | 236 | else { |
| 234 | #ifdef RGBLIGHT_USE_TIMER | 237 | #ifdef RGBLIGHT_USE_TIMER |
| 235 | rgblight_timer_disable(); | 238 | rgblight_timer_disable(); |
