Browse Source

Adds a method allowing to set custom colors to the rgb matrix

pull/3676/merge 0.6.132
Florian Didron 5 years ago
committed by Jack Humbert
parent
commit
9aecf4ccfd
2 changed files with 8 additions and 0 deletions
  1. +7
    -0
      quantum/rgb_matrix.c
  2. +1
    -0
      quantum/rgb_matrix.h

+ 7
- 0
quantum/rgb_matrix.c View File

@ -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);
}

+ 1
- 0
quantum/rgb_matrix.h View File

@ -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);


Loading…
Cancel
Save