Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off RGB Matrix LEDs when keyboard sleeps #7713

Merged
merged 1 commit into from
Dec 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion quantum/rgb_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,12 @@ void rgb_matrix_init(void) {
eeconfig_debug_rgb_matrix(); // display current eeprom values
}

void rgb_matrix_set_suspend_state(bool state) { g_suspend_state = state; }
void rgb_matrix_set_suspend_state(bool state) {
if (RGB_DISABLE_WHEN_USB_SUSPENDED && state) {
rgb_matrix_set_color_all(0, 0, 0); // turn off all LEDs when suspending
}
g_suspend_state = state;
}

void rgb_matrix_toggle(void) {
rgb_matrix_config.enable ^= 1;
Expand Down