diff options
| author | Albert Y <76888457+filterpaper@users.noreply.github.com> | 2021-03-25 19:52:53 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-25 22:52:53 +1100 |
| commit | 6276f54752e98ab1f99eaff5c077c52bf29e5c81 (patch) | |
| tree | 25d20c32f46def7414c021845f498de5bfb55af9 /keyboards/boardsource | |
| parent | 8e820cde131c72d7966fb5dd528ba0ed2c1cd577 (diff) | |
| download | qmk_firmware-6276f54752e98ab1f99eaff5c077c52bf29e5c81.tar.gz qmk_firmware-6276f54752e98ab1f99eaff5c077c52bf29e5c81.zip | |
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>
Diffstat (limited to 'keyboards/boardsource')
| -rw-r--r-- | keyboards/boardsource/the_mark/config.h | 1 | ||||
| -rw-r--r-- | keyboards/boardsource/the_mark/the_mark.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/keyboards/boardsource/the_mark/config.h b/keyboards/boardsource/the_mark/config.h index cb64c3a69..7af2c302f 100644 --- a/keyboards/boardsource/the_mark/config.h +++ b/keyboards/boardsource/the_mark/config.h | |||
| @@ -58,6 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 58 | #ifdef RGB_MATRIX_ENABLE | 58 | #ifdef RGB_MATRIX_ENABLE |
| 59 | #define DRIVER_LED_TOTAL 24 // Number of LEDs | 59 | #define DRIVER_LED_TOTAL 24 // Number of LEDs |
| 60 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 | 60 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 |
| 61 | #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended | ||
| 61 | #endif | 62 | #endif |
| 62 | 63 | ||
| 63 | /* | 64 | /* |
diff --git a/keyboards/boardsource/the_mark/the_mark.c b/keyboards/boardsource/the_mark/the_mark.c index bb37974f6..9bc1f5b46 100644 --- a/keyboards/boardsource/the_mark/the_mark.c +++ b/keyboards/boardsource/the_mark/the_mark.c | |||
| @@ -35,4 +35,15 @@ led_config_t g_led_config = { { | |||
| 35 | LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, | 35 | LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, |
| 36 | LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL | 36 | LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL |
| 37 | } }; | 37 | } }; |
| 38 | |||
| 39 | |||
| 40 | void suspend_power_down_kb(void) { | ||
| 41 | rgb_matrix_set_suspend_state(true); | ||
| 42 | suspend_power_down_user(); | ||
| 43 | } | ||
| 44 | |||
| 45 | void suspend_wakeup_init_kb(void) { | ||
| 46 | rgb_matrix_set_suspend_state(false); | ||
| 47 | suspend_wakeup_init_user(); | ||
| 48 | } | ||
| 38 | #endif | 49 | #endif |
