Skip to content

Commit

Permalink
Clean up remaining RGB_DISABLE_WHEN_USB_SUSPENDED defines (qmk#13689)
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna authored Jul 24, 2021
1 parent 1736513 commit 8ecbb5e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 55 deletions.
29 changes: 1 addition & 28 deletions docs/feature_led_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
#define LED_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects
#define LED_DISABLE_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off
#define LED_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects
#define LED_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
#define LED_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
#define LED_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs
Expand Down Expand Up @@ -350,30 +350,3 @@ void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
LED_MATRIX_INDICATOR_SET_VALUE(index, value);
}
```

## Suspended State :id=suspended-state
To use the suspend feature, make sure that `#define LED_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.

Additionally add this to your `<keyboard>.c`:

```c
void suspend_power_down_kb(void) {
led_matrix_set_suspend_state(true);
suspend_power_down_user();
}

void suspend_wakeup_init_kb(void) {
led_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
```
or add this to your `keymap.c`:
```c
void suspend_power_down_user(void) {
led_matrix_set_suspend_state(true);
}
void suspend_wakeup_init_user(void) {
led_matrix_set_suspend_state(false);
}
```
27 changes: 0 additions & 27 deletions docs/feature_rgb_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -741,30 +741,3 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
}
}
```
### Suspended state :id=suspended-state
To use the suspend feature, make sure that `#define RGB_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.
Additionally add this to your `<keyboard>.c`:
```c
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();
}
```
or add this to your `keymap.c`:
```c
void suspend_power_down_user(void) {
rgb_matrix_set_suspend_state(true);
}

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

0 comments on commit 8ecbb5e

Please sign in to comment.