diff options
author | Florian Didron <florian@111studio.jp> | 2018-10-02 08:41:19 +0900 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-10-02 16:33:49 -0400 |
commit | 9aecf4ccfdbef6123bbf0a1e6670f85f4763ee89 (patch) | |
tree | b1d4c263b7d0b3e92019b38ba4260047c28e218d /quantum/rgb_matrix.c | |
parent | 66b793730ead28e409cbc152606a769e1c7b6a0b (diff) | |
download | qmk_firmware-9aecf4ccfdbef6123bbf0a1e6670f85f4763ee89.tar.gz qmk_firmware-9aecf4ccfdbef6123bbf0a1e6670f85f4763ee89.zip |
Adds a method allowing to set custom colors to the rgb matrix
Diffstat (limited to 'quantum/rgb_matrix.c')
-rw-r--r-- | quantum/rgb_matrix.c | 7 |
1 files changed, 7 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) { | |||
903 | uint32_t rgblight_get_mode(void) { | 903 | uint32_t rgblight_get_mode(void) { |
904 | return rgb_matrix_config.mode; | 904 | return rgb_matrix_config.mode; |
905 | } | 905 | } |
906 | |||
907 | void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { | ||
908 | rgb_matrix_config.hue = hue; | ||
909 | rgb_matrix_config.sat = sat; | ||
910 | rgb_matrix_config.val = val; | ||
911 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | ||
912 | } | ||