diff --git a/keyboards/framework/config.h b/keyboards/framework/config.h index 45bfb06bb6..54e242ffe4 100644 --- a/keyboards/framework/config.h +++ b/keyboards/framework/config.h @@ -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 diff --git a/keyboards/framework/framework.c b/keyboards/framework/framework.c index 346a044e51..ad7a930ec0 100644 --- a/keyboards/framework/framework.c +++ b/keyboards/framework/framework.c @@ -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 } diff --git a/keyboards/framework/matrix.c b/keyboards/framework/matrix.c index a7608deccd..26786aa0f0 100644 --- a/keyboards/framework/matrix.c +++ b/keyboards/framework/matrix.c @@ -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