Un-extern
RGBLight led[]
array (#23322)
This commit is contained in:
parent
c038292c1e
commit
583cde398a
9 changed files with 17 additions and 188 deletions
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue