fl16: Don't turn off LEDs in USB suspend
Signed-off-by: Daniel Schaefer <dhs@frame.work>
This commit is contained in:
parent
385ed1a291
commit
1e6896999f
@ -59,6 +59,10 @@
|
||||
|
||||
// RGB config
|
||||
|
||||
// Don't turn off backlight and caps LED when in USB suspend
|
||||
// Because with selective suspend, the driver will eagerly suspend the keyboard after only a short while of inactivity
|
||||
#define NO_SUSPEND_POWER_DOWN
|
||||
// Must keep this, so we can suspend RGB backlight with SLEEP# pin
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||
|
||||
// RGB Matrix Animation modes. Explicitly enabled
|
||||
|
||||
@ -43,7 +43,9 @@ void suspend_power_down_kb(void) {
|
||||
suspend_power_down_user();
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# ifndef NO_SUSPEND_POWER_DOWN
|
||||
writePinLow(IS31FL3743A_ENABLE_GPIO);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -54,8 +56,9 @@ void suspend_wakeup_init_kb(void) {
|
||||
suspend_wakeup_init_user();
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
setPinOutput(IS31FL3743A_ENABLE_GPIO);
|
||||
# ifndef NO_SUSPEND_POWER_DOWN
|
||||
writePinHigh(IS31FL3743A_ENABLE_GPIO);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -267,6 +267,11 @@ bool handle_idle(void) {
|
||||
}
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
if (rgb_matrix_get_suspend_state() != asleep) {
|
||||
if asleep {
|
||||
writePinLow(IS31FL3743A_ENABLE_GPIO)
|
||||
} else {
|
||||
writePinHigh(IS31FL3743A_ENABLE_GPIO)
|
||||
}
|
||||
rgb_matrix_set_suspend_state(asleep);
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user