diff options
author | Drashna Jaelre <[email protected]> | 2018-05-29 08:05:22 -0700 |
---|---|---|
committer | Jack Humbert <[email protected]> | 2018-05-29 11:05:22 -0400 |
commit | 751719e6cb547db753b2f33f06ee6fa61607d544 (patch) | |
tree | 456437ab1d6c051e73ccd2e92d4fb1445d496ca8 /quantum/rgblight.h | |
parent | 034a25aedf5e0ddba2b05f4b3534c1522330d5cd (diff) | |
download | qmk_firmware-751719e6cb547db753b2f33f06ee6fa61607d544.tar.gz qmk_firmware-751719e6cb547db753b2f33f06ee6fa61607d544.zip |
Add and fix _noeeprom functions to many of the RGB Underglow functions (#3070)0.6.42
* 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!
Diffstat (limited to 'quantum/rgblight.h')
-rw-r--r-- | quantum/rgblight.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/quantum/rgblight.h b/quantum/rgblight.h index a6593af98b..569424506b 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -134,7 +134,16 @@ void rgb_matrix_decrease(void); void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); + void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); +void rgblight_mode_noeeprom(uint8_t mode); +void rgblight_toggle_noeeprom(void); +void rgblight_enable_noeeprom(void); +void rgblight_disable_noeeprom(void); + +void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); +void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); + #define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); |