diff options
| author | Albert Y <76888457+filterpaper@users.noreply.github.com> | 2021-03-25 20:01:03 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-25 23:01:03 +1100 |
| commit | 29c82cfb33bda7fecc58fa9eadfe56bd10af2c56 (patch) | |
| tree | 1d8191c7b699798196b9ac2c02da77fa6b6af1a4 | |
| parent | 2cd684f8e0385d97f09a2d08cd9c5f8b2e77845a (diff) | |
| download | qmk_firmware-29c82cfb33bda7fecc58fa9eadfe56bd10af2c56.tar.gz qmk_firmware-29c82cfb33bda7fecc58fa9eadfe56bd10af2c56.zip | |
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>
| -rwxr-xr-x | keyboards/bm40hsrgb/bm40hsrgb.c | 11 | ||||
| -rwxr-xr-x | keyboards/bm40hsrgb/config.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/keyboards/bm40hsrgb/bm40hsrgb.c b/keyboards/bm40hsrgb/bm40hsrgb.c index a44263a8b..a0ba84db3 100755 --- a/keyboards/bm40hsrgb/bm40hsrgb.c +++ b/keyboards/bm40hsrgb/bm40hsrgb.c | |||
| @@ -39,4 +39,15 @@ led_config_t g_led_config = { | |||
| 39 | 2, 2, 2, 2, 2, 2 | 39 | 2, 2, 2, 2, 2, 2 |
| 40 | } | 40 | } |
| 41 | }; | 41 | }; |
| 42 | |||
| 43 | |||
| 44 | void suspend_power_down_kb(void) { | ||
| 45 | rgb_matrix_set_suspend_state(true); | ||
| 46 | suspend_power_down_user(); | ||
| 47 | } | ||
| 48 | |||
| 49 | void suspend_wakeup_init_kb(void) { | ||
| 50 | rgb_matrix_set_suspend_state(false); | ||
| 51 | suspend_wakeup_init_user(); | ||
| 52 | } | ||
| 42 | #endif | 53 | #endif |
diff --git a/keyboards/bm40hsrgb/config.h b/keyboards/bm40hsrgb/config.h index 5c1ee0621..84d0950d5 100755 --- a/keyboards/bm40hsrgb/config.h +++ b/keyboards/bm40hsrgb/config.h | |||
| @@ -50,3 +50,6 @@ | |||
| 50 | #ifdef RGB_DI_PIN | 50 | #ifdef RGB_DI_PIN |
| 51 | #define RGB_MATRIX_KEYPRESSES // reacts to keypresses | 51 | #define RGB_MATRIX_KEYPRESSES // reacts to keypresses |
| 52 | #endif | 52 | #endif |
| 53 | #ifdef RGB_MATRIX_ENABLE | ||
| 54 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended | ||
| 55 | #endif | ||
