Browse Source

Clean up remaining RGB_DISABLE_WHEN_USB_SUSPENDED defines (#13689)

Drashna Jaelre 4 years ago
parent
commit
0b95ac2e4b

+ 1 - 28
docs/feature_led_matrix.md

@@ -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
@@ -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);
-}
-```

+ 0 - 27
docs/feature_rgb_matrix.md

@@ -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);
-}
-```

+ 1 - 3
keyboards/bastardkb/scylla/config.h

@@ -52,8 +52,6 @@
 #    define RGB_MATRIX_SPLIT { 29, 29 }
 #    define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50
 #    define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
-#    ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
-#        define RGB_DISABLE_WHEN_USB_SUSPENDED true
-#    endif
+#    define RGB_DISABLE_WHEN_USB_SUSPENDED
 #    define RGB_MATRIX_KEYPRESSES
 #endif

+ 1 - 3
keyboards/bastardkb/tbkmini/config.h

@@ -53,8 +53,6 @@
 #    define RGB_MATRIX_SPLIT { 21, 21 }
 #    define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50
 #    define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
-#    ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
-#        define RGB_DISABLE_WHEN_USB_SUSPENDED true
-#    endif
+#    define RGB_DISABLE_WHEN_USB_SUSPENDED
 #    define RGB_MATRIX_KEYPRESSES
 #endif

+ 3 - 5
keyboards/boardsource/the_mark/config.h

@@ -56,11 +56,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 /* RGB matrix support */
 #ifdef RGB_MATRIX_ENABLE
-#define DRIVER_LED_TOTAL 24 // Number of LEDs
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
-#    ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
-#    define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-#    endif
+#    define DRIVER_LED_TOTAL 24  // Number of LEDs
+#    define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
+#    define RGB_DISABLE_WHEN_USB_SUSPENDED  // turn off effects when suspended
 #endif
 
 /*

+ 2 - 2
keyboards/crkbd/keymaps/davidrambo/config.h

@@ -41,8 +41,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
     #define RGB_MATRIX_TYPING_MEATMAP_DECREASE_DELAY_MS 50
     // #   define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
     // #   define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-    #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
-    #define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#    define RGB_DISABLE_WHEN_USB_SUSPENDED  // turn off effects when suspended
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
     // #   define RGB_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 RGB_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 RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.

+ 9 - 9
keyboards/durgod/dgk6x/config.h

@@ -77,15 +77,15 @@
 #define I2C1_TIMINGR_SCLH   0x0cU
 #define I2C1_TIMINGR_SCLL   0x22U
 
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_LED_PROCESS_LIMIT 4
-#define RGB_MATRIX_LED_FLUSH_LIMIT 26
-
-#define DISABLE_RGB_MATRIX_HUE_BREATHING
-#define DISABLE_RGB_MATRIX_HUE_PENDULUM
-#define DISABLE_RGB_MATRIX_HUE_WAVE
+#    define RGB_DISABLE_WHEN_USB_SUSPENDED  // turn off effects when suspended
+#    define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#    define RGB_MATRIX_KEYPRESSES
+#    define RGB_MATRIX_LED_PROCESS_LIMIT 4
+#    define RGB_MATRIX_LED_FLUSH_LIMIT 26
+
+#    define DISABLE_RGB_MATRIX_HUE_BREATHING
+#    define DISABLE_RGB_MATRIX_HUE_PENDULUM
+#    define DISABLE_RGB_MATRIX_HUE_WAVE
 
 // This allows VIA to control RGB Matrix settings in the 'Lighting' section.
 #define VIA_QMK_RGBLIGHT_ENABLE

+ 2 - 2
keyboards/dztech/dz60rgb/v2_1/config.h

@@ -53,7 +53,7 @@
 
 #ifdef RGB_MATRIX_ENABLE
 #    define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#    define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#    define RGB_DISABLE_WHEN_USB_SUSPENDED  // turn off effects when suspended
 #    define RGB_MATRIX_KEYPRESSES
 #    define RGB_MATRIX_FRAMEBUFFER_EFFECTS
 #    define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
@@ -72,7 +72,7 @@
 #    define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
 #    define DISABLE_RGB_MATRIX_DIGITAL_RAIN
 #    define DRIVER_ADDR_1 0b1010000
-#    define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
+#    define DRIVER_ADDR_2 0b1010000  // this is here for compliancy reasons.
 #    define DRIVER_COUNT 2
 #    define DRIVER_1_LED_TOTAL 63
 #    define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL

+ 12 - 12
keyboards/dztech/dz65rgb/v3/config.h

@@ -42,16 +42,16 @@
 #define NO_ACTION_FUNCTION
 #ifdef RGB_MATRIX_ENABLE
 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
-#define USB_SUSPEND_WAKEUP_DELAY 5000
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_LED_PROCESS_LIMIT 4
-#define RGB_MATRIX_LED_FLUSH_LIMIT 26
-#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
-#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 68
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
-#define DRIVER_INDICATOR_LED_TOTAL 0
+#    define RGB_DISABLE_WHEN_USB_SUSPENDED  // turn off effects when suspended
+#    define USB_SUSPEND_WAKEUP_DELAY 5000
+#    define RGB_MATRIX_KEYPRESSES
+#    define RGB_MATRIX_LED_PROCESS_LIMIT 4
+#    define RGB_MATRIX_LED_FLUSH_LIMIT 26
+#    define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
+#    define DRIVER_ADDR_1 0b0110000
+#    define DRIVER_ADDR_2 0b0110000  // this is here for compliancy reasons.
+#    define DRIVER_COUNT 1
+#    define DRIVER_1_LED_TOTAL 68
+#    define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#    define DRIVER_INDICATOR_LED_TOTAL 0
 #endif

+ 1 - 1
keyboards/handwired/tractyl_manuform/4x6_right/config.h

@@ -39,7 +39,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define RGB_DI_PIN       E7
 #define DRIVER_LED_TOTAL 62
 #define RGB_MATRIX_SPLIT { 32, 30 }
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
 #define RGB_MATRIX_KEYPRESSES
 // #define RGB_MATRIX_KEYRELEASES
 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS

+ 15 - 15
keyboards/latin6rgb/config.h

@@ -1,18 +1,18 @@
 /* Copyright 2021 18438880
-  * 
-  * This program is free software: you can redistribute it and/or modify 
-  * it under the terms of the GNU General Public License as published by 
-  * the Free Software Foundation, either version 2 of the License, or 
-  * (at your option) any later version. 
-  * 
-  * This program is distributed in the hope that it will be useful, 
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
-  * GNU General Public License for more details. 
-  * 
-  * You should have received a copy of the GNU General Public License 
-  * along with this program.  If not, see <http://www.gnu.org/licenses/>. 
-  */ 
+  *
+  * This program is free software: you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License as published by
+  * the Free Software Foundation, either version 2 of the License, or
+  * (at your option) any later version.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  *
+  * You should have received a copy of the GNU General Public License
+  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  */
 
 
 #pragma once
@@ -57,7 +57,7 @@
 
 #ifdef RGB_MATRIX_ENABLE
 #    define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#    define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#    define RGB_DISABLE_WHEN_USB_SUSPENDED  // turn off effects when suspended
 #    define RGB_MATRIX_KEYPRESSES
 #    define RGB_MATRIX_FRAMEBUFFER_EFFECTS
 #    define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN

+ 1 - 3
keyboards/planck/rev6/config.h

@@ -140,8 +140,6 @@
 #define WS2812_DMA_STREAM STM32_DMA1_STREAM2
 #define WS2812_DMA_CHANNEL 2
 
-#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
-#    define RGB_DISABLE_WHEN_USB_SUSPENDED
-#endif
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
 
 #endif

+ 1 - 1
keyboards/rgbkb/mun/config.h

@@ -86,7 +86,7 @@
 #define RGB_MATRIX_LED_PROCESS_LIMIT 10
 #define RGB_MATRIX_KEYPRESSES
 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
 
 #if RGB_UNLIMITED_POWER
   #define RGBLIGHT_LIMIT_VAL 255

+ 1 - 3
keyboards/rgbkb/mun/keymaps/default/config.h

@@ -18,8 +18,7 @@
 
 // 20m timeout (20m * 60s * 1000mil)
 // #define RGB_DISABLE_TIMEOUT 1200000
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
-
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
 
 #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2
 // 224B per layer right now
@@ -29,4 +28,3 @@
 #define VIA_QMK_RGBLIGHT_ENABLE
 
 #define STM32_ONBOARD_EEPROM_SIZE 2048
-

+ 2 - 2
keyboards/rgbkb/mun/keymaps/xulkal2/config.h

@@ -30,7 +30,7 @@
 
 // 20m timeout (20m * 60s * 1000mil)
 // #define RGB_DISABLE_TIMEOUT 1200000
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
 #define OLED_SCROLL_TIMEOUT 20000
 #define ONESHOT_TAP_TOGGLE 2
 
@@ -39,4 +39,4 @@
 #define RGB_MATRIX_VAL_STEP 8
 #define RGB_MATRIX_SPD_STEP 8
 
-#define ENCODER_RESOLUTION 2
+#define ENCODER_RESOLUTION 2

+ 2 - 2
keyboards/sawnsprojects/satxri6key/config.h

@@ -71,7 +71,7 @@
 #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS
 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
 #define RGB_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 RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Sets the default mode, if none has been set
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Sets the default mode, if none has been set

+ 3 - 2
keyboards/xbows/knight/config.h

@@ -35,10 +35,11 @@
 #    define RGB_MATRIX_LED_PROCESS_LIMIT 18
 #    define RGB_MATRIX_LED_FLUSH_LIMIT 16
 #    define RGB_DISABLE_AFTER_TIMEOUT 0          // number of ticks to wait until disabling effects
-#    define RGB_DISABLE_WHEN_USB_SUSPENDED true  // turn off effects when suspended
+#    define RGB_DISABLE_WHEN_USB_SUSPENDED       // turn off effects when suspended
 #    define RGB_MATRIX_KEYPRESSES
 #    define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
-#    define RGB_MATRIX_CENTER { 92, 43 }
+#    define RGB_MATRIX_CENTER \
+        { 92, 43 }
 
 #    define DRIVER_ADDR_1 0b1110100
 #    define DRIVER_ADDR_2 0b1110110

+ 3 - 2
keyboards/xbows/knight_plus/config.h

@@ -36,9 +36,10 @@
 #    define RGB_MATRIX_LED_FLUSH_LIMIT 16
 #    define RGB_DISABLE_AFTER_TIMEOUT 0          // number of ticks to wait until disabling effects
 #    define RGB_MATRIX_KEYPRESSES
-#    define RGB_DISABLE_WHEN_USB_SUSPENDED true  // turn off effects when suspended
+#    define RGB_DISABLE_WHEN_USB_SUSPENDED  // turn off effects when suspended
 #    define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
-#    define RGB_MATRIX_CENTER { 92, 43 }
+#    define RGB_MATRIX_CENTER \
+        { 92, 43 }
 
 #    define DRIVER_ADDR_1 0b1110100
 #    define DRIVER_ADDR_2 0b1110110

+ 3 - 2
keyboards/xbows/numpad/config.h

@@ -35,10 +35,11 @@
 #    define RGB_MATRIX_LED_PROCESS_LIMIT 18
 #    define RGB_MATRIX_LED_FLUSH_LIMIT 16
 #    define RGB_DISABLE_AFTER_TIMEOUT 0          // number of ticks to wait until disabling effects
-#    define RGB_DISABLE_WHEN_USB_SUSPENDED true  // turn off effects when suspended
+#    define RGB_DISABLE_WHEN_USB_SUSPENDED       // turn off effects when suspended
 #    define RGB_MATRIX_KEYPRESSES
 #    define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
-#    define RGB_MATRIX_CENTER { 30, 32 }
+#    define RGB_MATRIX_CENTER \
+        { 30, 32 }
 
 #    define DRIVER_ADDR_1 0b1110111
 #    define DRIVER_COUNT 1

+ 1 - 1
keyboards/xelus/pachi/rgb/config.h

@@ -70,7 +70,7 @@
 #define RGB_MATRIX_STARTUP_VAL 80
 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS
 #define RGB_MATRIX_KEYPRESSES
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED  // turn off effects when suspended
 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
 
 #define FORCE_NKRO