Move implementation of callback function into backlight
This commit is contained in:
parent
a74976d2db
commit
fa46fa1edd
@ -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];
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user