diff --git a/keyboard/staryu/backlight.c b/keyboard/staryu/backlight.c index 9b223dcc..748ccf82 100644 --- a/keyboard/staryu/backlight.c +++ b/keyboard/staryu/backlight.c @@ -165,6 +165,11 @@ void action_keyevent(keyevent_t event) } #ifdef CUSTOM_LED_ENABLE +void softpwm_led_custom(void) +{ + rgb_fading(); +} + void fading_led_custom(uint8_t *value) { uint8_t tmp = value[0]; diff --git a/keyboard/staryu/rgb.c b/keyboard/staryu/rgb.c index 0ce7e7e9..13dc8856 100644 --- a/keyboard/staryu/rgb.c +++ b/keyboard/staryu/rgb.c @@ -34,6 +34,7 @@ extern uint8_t backlight_brightness; static void rgb_write_config(void); static void rgb_read_config(void); static void rgb_set_level(uint8_t level); +static void rgb_refresh(void); static void hue_to_rgb(uint16_t hue, struct cRGB *rgb); static void hsb_to_rgb(uint16_t hue, uint8_t saturation, uint8_t brightness, struct cRGB *rgb); @@ -192,8 +193,7 @@ void hsb_to_rgb(uint16_t hue, uint8_t saturation, uint8_t brightness, struct cRG rgb->b = temp[n]; } -#ifdef CUSTOM_LED_ENABLE -void softpwm_led_custom(void) +void rgb_fading(void) { static uint8_t step = 0; static uint16_t hue = 0; @@ -208,4 +208,3 @@ void softpwm_led_custom(void) } } } -#endif diff --git a/keyboard/staryu/rgb.h b/keyboard/staryu/rgb.h index 5e001b3e..0cca98d1 100644 --- a/keyboard/staryu/rgb.h +++ b/keyboard/staryu/rgb.h @@ -55,5 +55,6 @@ void rgb_decrease(void); void rgb_increase(void); void rgb_step(void); void rgb_set_brightness(uint8_t brightness); +void rgb_fading(void); #endif