From 751719e6cb547db753b2f33f06ee6fa61607d544 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 29 May 2018 08:05:22 -0700 Subject: Add and fix _noeeprom functions to many of the RGB Underglow functions (#3070) * And and fix _noeeprom functions to many of the RGB Underglow functions * Many functions are unnecessarily calling the eeprom write code. The toggle/enable is command is especially guilty of this, as it writes to EEPROM 3 times. But rgb mode writes twice, every time it's called. And init resets the rgb eeprom range and then writes back to it twice! * Fixed the rgblight_sethsv_noeeprom to work as expected, by moving a lot of the code to a helper function. * Added a noeeprom function for mode, enable, disable, and toggle functions. (didn't bother for increase/decrease stuff, and didn't add new keycodes) * Add to predefined colors list * Add new functions to manual/docs * Update RGB Sleep feature to use _noeeprom Because that's exactly what it should be doing, actually! --- tmk_core/common/avr/suspend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tmk_core') diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 81e426641..3aa3d1247 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -101,7 +101,7 @@ static void power_down(uint8_t wdto) #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_disable(); #endif - rgblight_disable(); + rgblight_disable_noeeprom(); #endif // TODO: more power saving // See PicoPower application note @@ -157,7 +157,7 @@ void suspend_wakeup_init(void) #endif led_set(host_keyboard_leds()); #ifdef RGBLIGHT_SLEEP - rgblight_enable(); + rgblight_enable_noeeprom(); #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_enable(); #endif -- cgit v1.2.3-24-g4f1b