summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgblight.c12
-rw-r--r--quantum/rgblight.h3
2 files changed, 15 insertions, 0 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 63eda47cd..ab218b8c5 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -370,6 +370,18 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) {
}
}
+uint16_t rgblight_get_hue(void) {
+ return rgblight_config.hue;
+}
+
+uint8_t rgblight_get_sat(void) {
+ return rgblight_config.sat;
+}
+
+uint8_t rgblight_get_val(void) {
+ return rgblight_config.val;
+}
+
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
if (!rgblight_config.enable) { return; }
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index 6d362e1d5..73dd89946 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -113,6 +113,9 @@ void rgblight_decrease_sat(void);
void rgblight_increase_val(void);
void rgblight_decrease_val(void);
void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val);
+uint16_t rgblight_get_hue(void);
+uint8_t rgblight_get_sat(void);
+uint8_t rgblight_get_val(void);
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b);
void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index);
void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index);