summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgblight.c6
-rw-r--r--quantum/rgblight.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index bb03d6e913..625971e0fe 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -425,6 +425,12 @@ void rgblight_timer_toggle(void) {
dprintf("TIMER3 toggled.\n");
}
+void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) {
+ rgblight_enable();
+ rgblight_mode(1);
+ rgblight_setrgb(r, g, b);
+}
+
void rgblight_task(void) {
if (rgblight_timer_enabled) {
// mode = 1, static light, do nothing here
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index 28a410e480..aa1d026e0e 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -84,6 +84,8 @@ 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);
+#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);
void rgblight_task(void);