diff options
Diffstat (limited to 'quantum/rgblight/rgblight.c')
| -rw-r--r-- | quantum/rgblight/rgblight.c | 22 | 
1 files changed, 12 insertions, 10 deletions
| diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c index 530cb04688..62137c020b 100644 --- a/quantum/rgblight/rgblight.c +++ b/quantum/rgblight/rgblight.c @@ -145,6 +145,15 @@ __attribute__((weak)) RGB rgblight_hsv_to_rgb(HSV hsv) {      return hsv_to_rgb(hsv);  } +void setrgb(uint8_t r, uint8_t g, uint8_t b, rgb_led_t *led1) { +    led1->r = r; +    led1->g = g; +    led1->b = b; +#ifdef RGBW +    led1->w = 0; +#endif +} +  void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, rgb_led_t *led1) {      HSV hsv = {hue, sat, val};      RGB rgb = rgblight_hsv_to_rgb(hsv); @@ -155,15 +164,6 @@ void sethsv(uint8_t hue, uint8_t sat, uint8_t val, rgb_led_t *led1) {      sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1);  } -void setrgb(uint8_t r, uint8_t g, uint8_t b, rgb_led_t *led1) { -    led1->r = r; -    led1->g = g; -    led1->b = b; -#ifdef RGBW -    led1->w = 0; -#endif -} -  void rgblight_check_config(void) {      /* Add some out of bound checks for RGB light config */ @@ -243,6 +243,8 @@ void rgblight_init(void) {      rgblight_timer_init(); // setup the timer +    rgblight_driver.init(); +      if (rgblight_config.enable) {          rgblight_mode_noeeprom(rgblight_config.mode);      } @@ -1566,4 +1568,4 @@ uint8_t rgblight_velocikey_match_speed(uint8_t minValue, uint8_t maxValue) {      return MAX(minValue, maxValue - (maxValue - minValue) * ((float)typing_speed / TYPING_SPEED_MAX_VALUE));  } -#endif
\ No newline at end of file +#endif | 
