1
0
Fork 0

VIA Protocol 12 + fixes (#19916)

Co-authored-by: Wilba <wilba@wilba.tech>
Co-authored-by: zvecr <git@zvecr.com>
This commit is contained in:
Nick Brassel 2023-02-23 09:19:00 +11:00 committed by GitHub
parent 403b0addea
commit 7f805cc779
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
135 changed files with 761 additions and 572 deletions

View file

@ -2554,9 +2554,7 @@ static void gpt_backlight_timer_task(GPTDriver *gptp)
if ( ! suspend_backlight )
{
#if !defined(RGB_BACKLIGHT_M6_B) && !defined(RGB_BACKLIGHT_M10_C)
backlight_effect_indicators();
#endif
}
}
@ -3426,3 +3424,14 @@ void backlight_debug_led( bool state )
}
}
#endif // defined(RGB_DEBUGGING_ONLY)
void backlight_device_indication(uint8_t value)
{
static uint8_t current_effect = 0;
static uint8_t alternate_effect = 0;
if ( value == 0 ) {
current_effect = g_config.effect;
alternate_effect = g_config.effect > 0 ? 0 : 1;
}
g_config.effect = value % 2 == 0 ? alternate_effect : current_effect;
}