Skip to content

Commit

Permalink
Turn off LEDs when usb is suspended
Browse files Browse the repository at this point in the history
  • Loading branch information
bencochran committed Jul 8, 2020
1 parent b59a06f commit 833f5e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions keyboards/massdrop/ctrl/config.h
Expand Up @@ -124,4 +124,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_MATRIX_LED_PROCESS_LIMIT 15
#define RGB_MATRIX_LED_FLUSH_LIMIT 10

#define RGB_DISABLE_WHEN_USB_SUSPENDED true

#include "config_led.h"
8 changes: 8 additions & 0 deletions keyboards/massdrop/ctrl/keymaps/bc/keymap.c
Expand Up @@ -54,6 +54,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
};

void suspend_power_down_user(void) {
rgb_matrix_set_suspend_state(true);
}

void suspend_wakeup_init_user(void) {
rgb_matrix_set_suspend_state(false);
}

// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
led_animation_id = 7;
Expand Down

0 comments on commit 833f5e3

Please sign in to comment.