diff options
author | Albert Y <76888457+filterpaper@users.noreply.github.com> | 2021-04-25 09:47:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-25 11:47:43 +1000 |
commit | c7ca67a036e9e4cd87ff203cf3c3d1922cb79e6d (patch) | |
tree | a44d17807a75d18be82c61b4f09202e8171dd6b9 | |
parent | b88498ba85aaf2fdd955ee9cbae6cffb327497de (diff) | |
download | qmk_firmware-c7ca67a036e9e4cd87ff203cf3c3d1922cb79e6d.tar.gz qmk_firmware-c7ca67a036e9e4cd87ff203cf3c3d1922cb79e6d.zip |
Add RGB matrix suspend wake function for Planck/rev6 (#12290)
* Add RGB matrix suspend wake function for Planck/rev6
* Update suggested definition to allow user override.
Co-authored-by: Nick Brassel <nick@tzarc.org>
Co-authored-by: filterpaper <filterpaper@localhost>
Co-authored-by: Nick Brassel <nick@tzarc.org>
-rw-r--r-- | keyboards/planck/rev6/config.h | 4 | ||||
-rw-r--r-- | keyboards/planck/rev6/rev6.c | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 63c44001f..4bc8a509f 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h | |||
@@ -140,4 +140,8 @@ | |||
140 | #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 | 140 | #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 |
141 | #define WS2812_DMA_CHANNEL 2 | 141 | #define WS2812_DMA_CHANNEL 2 |
142 | 142 | ||
143 | #ifndef RGB_DISABLE_WHEN_USB_SUSPENDED | ||
144 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true | ||
145 | #endif | ||
146 | |||
143 | #endif | 147 | #endif |
diff --git a/keyboards/planck/rev6/rev6.c b/keyboards/planck/rev6/rev6.c index 3074f8c20..4f2ff8681 100644 --- a/keyboards/planck/rev6/rev6.c +++ b/keyboards/planck/rev6/rev6.c | |||
@@ -39,6 +39,16 @@ led_config_t g_led_config = { { | |||
39 | // 6 5 4 3 | 39 | // 6 5 4 3 |
40 | // 0 | 40 | // 0 |
41 | // 7 8 1 2 | 41 | // 7 8 1 2 |
42 | |||
43 | void suspend_power_down_kb(void) { | ||
44 | rgb_matrix_set_suspend_state(true); | ||
45 | suspend_power_down_user(); | ||
46 | } | ||
47 | |||
48 | void suspend_wakeup_init_kb(void) { | ||
49 | rgb_matrix_set_suspend_state(false); | ||
50 | suspend_wakeup_init_user(); | ||
51 | } | ||
42 | #endif | 52 | #endif |
43 | 53 | ||
44 | void matrix_init_kb(void) { | 54 | void matrix_init_kb(void) { |