~ruther/qmk_firmware

6276f54752e98ab1f99eaff5c077c52bf29e5c81 — Albert Y 4 years ago 8e820cd
Add suspend wake functions for The Mark:65's RGB Matrix (#12245)

* Add suspend wake functions for RGB Matrix

* Add USB suspend definition to config.h

Co-authored-by: filterpaper <filterpaper@localhost>
2 files changed, 12 insertions(+), 0 deletions(-)

M keyboards/boardsource/the_mark/config.h
M keyboards/boardsource/the_mark/the_mark.c
M keyboards/boardsource/the_mark/config.h => keyboards/boardsource/the_mark/config.h +1 -0
@@ 58,6 58,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
#ifdef RGB_MATRIX_ENABLE
#define DRIVER_LED_TOTAL 24 // Number of LEDs
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#endif

/*

M keyboards/boardsource/the_mark/the_mark.c => keyboards/boardsource/the_mark/the_mark.c +11 -0
@@ 35,4 35,15 @@ led_config_t g_led_config = { {
	LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
	LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL
} };


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