summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorFlorian Didron <florian@111studio.jp>2018-10-02 01:41:19 +0200
committerJack Humbert <jack.humb@gmail.com>2018-10-02 22:33:49 +0200
commit9aecf4ccfdbef6123bbf0a1e6670f85f4763ee89 (patch)
treeb1d4c263b7d0b3e92019b38ba4260047c28e218d /quantum
parent66b793730ead28e409cbc152606a769e1c7b6a0b (diff)
downloadqmk_firmware-9aecf4ccfdbef6123bbf0a1e6670f85f4763ee89.tar.gz
qmk_firmware-9aecf4ccfdbef6123bbf0a1e6670f85f4763ee89.tar.xz
Adds a method allowing to set custom colors to the rgb matrix
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgb_matrix.c7
-rw-r--r--quantum/rgb_matrix.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index f0c2ddfdf..1f00e9d99 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -903,3 +903,10 @@ void rgblight_mode(uint8_t mode) {
uint32_t rgblight_get_mode(void) {
return rgb_matrix_config.mode;
}
+
+void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) {
+ rgb_matrix_config.hue = hue;
+ rgb_matrix_config.sat = sat;
+ rgb_matrix_config.val = val;
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+}
diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h
index 45caaac42..d2450a7d9 100644
--- a/quantum/rgb_matrix.h
+++ b/quantum/rgb_matrix.h
@@ -128,6 +128,7 @@ uint32_t rgb_matrix_get_tick(void);
void rgblight_toggle(void);
void rgblight_step(void);
+void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val);
void rgblight_step_reverse(void);
void rgblight_increase_hue(void);
void rgblight_decrease_hue(void);