diff options
author | Ryan <[email protected]> | 2024-03-22 17:04:13 +1100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-22 06:04:13 +0000 |
commit | 583cde398a28e429485b440de38a2ed9ec528830 (patch) | |
tree | bdeabc69fdfad53fd987ab0326a7cc14bbc8f93a /quantum/rgblight/rgblight.c | |
parent | c038292c1eddfa588d26e0e4d1dff7e9e13052ad (diff) | |
download | qmk_firmware-583cde398a28e429485b440de38a2ed9ec528830.tar.gz qmk_firmware-583cde398a28e429485b440de38a2ed9ec528830.zip |
Un-`extern` RGBLight `led[]` array (#23322)
Diffstat (limited to 'quantum/rgblight/rgblight.c')
-rw-r--r-- | quantum/rgblight/rgblight.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c index 28b58feea6..b17a501eef 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 */ |