summaryrefslogtreecommitdiffstats
path: root/quantum/rgblight.c
diff options
context:
space:
mode:
authorLen Trigg <lenbok@gmail.com>2019-03-15 21:46:49 +0100
committerDrashna Jaelre <drashna@live.com>2019-03-15 21:46:49 +0100
commit9c4424ae2cd86002cd2f4140eff7108212ef884e (patch)
tree02885c02070df4a3f7ee0feb36a28123faf425f0 /quantum/rgblight.c
parentfabdb3c4e8ce4659539a2b0fa4cafc56a07d6c2d (diff)
downloadqmk_firmware-9c4424ae2cd86002cd2f4140eff7108212ef884e.tar.gz
qmk_firmware-9c4424ae2cd86002cd2f4140eff7108212ef884e.tar.xz
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.c7
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) {
}
+uint32_t rgblight_read_dword(void) {
+ return rgblight_config.raw;
+}
+
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);
+ rgblight_mode_noeeprom(rgblight_config.mode);
else {
#ifdef RGBLIGHT_USE_TIMER
rgblight_timer_disable();