From 0ea9391236df152ed6b5d4548422125f7f0d06fb Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 21 Jun 2019 12:12:44 -0700 Subject: [PATCH] Enable RGB Matrix Sleep functionality --- keyboards/ergodox_ez/ergodox_ez.c | 11 +++++++++++ keyboards/planck/ez/ez.c | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 09443cf725..951278517a 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -209,6 +209,17 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { #endif #ifdef RGB_MATRIX_ENABLE + +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(); +} + const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* driver * | R location diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c index 9b0cf13d7b..8ff3c203f8 100644 --- a/keyboards/planck/ez/ez.c +++ b/keyboards/planck/ez/ez.c @@ -16,6 +16,17 @@ #include "ez.h" #ifdef RGB_MATRIX_ENABLE + +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(); +} + const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver