fl16: Don't turn off LEDs in USB suspend
Signed-off-by: Daniel Schaefer <dhs@frame.work>
This commit is contained in:
@@ -59,6 +59,10 @@
|
|||||||
|
|
||||||
// RGB config
|
// 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
|
#define RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||||
|
|
||||||
// RGB Matrix Animation modes. Explicitly enabled
|
// RGB Matrix Animation modes. Explicitly enabled
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ void suspend_power_down_kb(void) {
|
|||||||
suspend_power_down_user();
|
suspend_power_down_user();
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
# ifndef NO_SUSPEND_POWER_DOWN
|
||||||
writePinLow(IS31FL3743A_ENABLE_GPIO);
|
writePinLow(IS31FL3743A_ENABLE_GPIO);
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,8 +56,9 @@ void suspend_wakeup_init_kb(void) {
|
|||||||
suspend_wakeup_init_user();
|
suspend_wakeup_init_user();
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
setPinOutput(IS31FL3743A_ENABLE_GPIO);
|
# ifndef NO_SUSPEND_POWER_DOWN
|
||||||
writePinHigh(IS31FL3743A_ENABLE_GPIO);
|
writePinHigh(IS31FL3743A_ENABLE_GPIO);
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -267,6 +267,11 @@ bool handle_idle(void) {
|
|||||||
}
|
}
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
if (rgb_matrix_get_suspend_state() != asleep) {
|
if (rgb_matrix_get_suspend_state() != asleep) {
|
||||||
|
if asleep {
|
||||||
|
writePinLow(IS31FL3743A_ENABLE_GPIO)
|
||||||
|
} else {
|
||||||
|
writePinHigh(IS31FL3743A_ENABLE_GPIO)
|
||||||
|
}
|
||||||
rgb_matrix_set_suspend_state(asleep);
|
rgb_matrix_set_suspend_state(asleep);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user