Add RGB Matrix suspend wake functions to BM40 (#12246)

* Add suspend wake functions for RGB Matrix

* Add suspension RGB functions to Planck/rev6 and Preonic/rev3

* Add suspend wake to Mark 65

* Revert changes to planck and preonic

* Remove changes to The Mark65

Co-authored-by: filterpaper <filterpaper@localhost>
master
Albert Y 2021-03-25 20:01:03 +08:00 committed by GitHub
parent 2cd684f8e0
commit 29c82cfb33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -39,4 +39,15 @@ led_config_t g_led_config = {
2, 2, 2, 2, 2, 2
}
};
void suspend_power_down_kb(void) {
rgb_matrix_set_suspend_state(true);
suspend_power_down_user();
}
void suspend_wakeup_init_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
#endif

View File

@ -50,3 +50,6 @@
#ifdef RGB_DI_PIN
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#endif
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#endif