summaryrefslogtreecommitdiffstats
path: root/quantum/rgblight_list.h
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-05-29 17:05:22 +0200
committerJack Humbert <jack.humb@gmail.com>2018-05-29 17:05:22 +0200
commit751719e6cb547db753b2f33f06ee6fa61607d544 (patch)
tree456437ab1d6c051e73ccd2e92d4fb1445d496ca8 /quantum/rgblight_list.h
parent034a25aedf5e0ddba2b05f4b3534c1522330d5cd (diff)
downloadqmk_firmware-751719e6cb547db753b2f33f06ee6fa61607d544.tar.gz
qmk_firmware-751719e6cb547db753b2f33f06ee6fa61607d544.tar.xz
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!
Diffstat (limited to 'quantum/rgblight_list.h')
-rw-r--r--quantum/rgblight_list.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/quantum/rgblight_list.h b/quantum/rgblight_list.h
index 29b280226..407fd8e9d 100644
--- a/quantum/rgblight_list.h
+++ b/quantum/rgblight_list.h
@@ -77,6 +77,30 @@
#define rgblight_sethsv_pink() rgblight_sethsv (330, 128, 255)
/* SET HSV List */
+/* If you're doing layer indication, this is best, as it won't */
+/* write to the eeprom, since it's limited (very high value). */
+/* If you want to use modes with this (since you can), then you */
+/* want to use rgblight_mode_noeeprom(x) instead. */
+#define rgblight_sethsv_noeeprom_white() rgblight_sethsv_noeeprom ( 0, 0, 255)
+#define rgblight_sethsv_noeeprom_red() rgblight_sethsv_noeeprom ( 0, 255, 255)
+#define rgblight_sethsv_noeeprom_coral() rgblight_sethsv_noeeprom ( 16, 176, 255)
+#define rgblight_sethsv_noeeprom_orange() rgblight_sethsv_noeeprom ( 39, 255, 255)
+#define rgblight_sethsv_noeeprom_goldenrod() rgblight_sethsv_noeeprom ( 43, 218, 218)
+#define rgblight_sethsv_noeeprom_gold() rgblight_sethsv_noeeprom ( 51, 255, 255)
+#define rgblight_sethsv_noeeprom_yellow() rgblight_sethsv_noeeprom ( 60, 255, 255)
+#define rgblight_sethsv_noeeprom_chartreuse() rgblight_sethsv_noeeprom ( 90, 255, 255)
+#define rgblight_sethsv_noeeprom_green() rgblight_sethsv_noeeprom (120, 255, 255)
+#define rgblight_sethsv_noeeprom_springgreen() rgblight_sethsv_noeeprom (150, 255, 255)
+#define rgblight_sethsv_noeeprom_turquoise() rgblight_sethsv_noeeprom (174, 90, 112)
+#define rgblight_sethsv_noeeprom_teal() rgblight_sethsv_noeeprom (180, 255, 128)
+#define rgblight_sethsv_noeeprom_cyan() rgblight_sethsv_noeeprom (180, 255, 255)
+#define rgblight_sethsv_noeeprom_azure() rgblight_sethsv_noeeprom (186, 102, 255)
+#define rgblight_sethsv_noeeprom_blue() rgblight_sethsv_noeeprom (240, 255, 255)
+#define rgblight_sethsv_noeeprom_purple() rgblight_sethsv_noeeprom (270, 255, 255)
+#define rgblight_sethsv_noeeprom_magenta() rgblight_sethsv_noeeprom (300, 255, 255)
+#define rgblight_sethsv_noeeprom_pink() rgblight_sethsv_noeeprom (330, 128, 255)
+
+/* SET HSV List */
#define rgblight_sethsv_white_at(at) rgblight_sethsv_at ( 0, 0, 255, at)
#define rgblight_sethsv_red_at(at) rgblight_sethsv_at ( 0, 255, 255, at)
#define rgblight_sethsv_coral_at(at) rgblight_sethsv_at ( 16, 176, 255, at)