summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-12-20 13:31:39 +1100
committerGitHub <noreply@github.com>2023-12-20 13:31:39 +1100
commit73758d3d3a3bbee76bd1c9946d4c663c28f166f0 (patch)
treee95d82b5b125d1aba00cc366730ff5e6aab5992e
parentb9e81c06911a4e3345acf09cd499a9661eea67b8 (diff)
Rename `LED_DISABLE_WHEN_USB_SUSPENDED` -> `LED_MATRIX_SLEEP` (#22681)
-rw-r--r--data/mappings/info_config.hjson5
-rw-r--r--docs/feature_led_matrix.md2
-rw-r--r--keyboards/input_club/ergodox_infinity/config.h2
-rw-r--r--keyboards/input_club/whitefox/config.h2
-rw-r--r--keyboards/keychron/c1_pro/ansi/white/config.h2
-rw-r--r--keyboards/keychron/c2_pro/ansi/white/config.h2
-rw-r--r--keyboards/keychron/s1/ansi/white/config.h2
-rw-r--r--keyboards/terrazzo/config.h2
-rw-r--r--quantum/led_matrix/led_matrix.c2
9 files changed, 11 insertions, 10 deletions
diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson
index a323865fec..52747c4a5a 100644
--- a/data/mappings/info_config.hjson
+++ b/data/mappings/info_config.hjson
@@ -74,12 +74,12 @@
74 "LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"}, 74 "LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"},
75 75
76 // LED Matrix 76 // LED Matrix
77 "LED_DISABLE_WHEN_USB_SUSPENDED": {"info_key": "led_matrix.sleep", "value_type": "bool"},
78 "LED_MATRIX_CENTER": {"info_key": "led_matrix.center_point", "value_type": "array.int"}, 77 "LED_MATRIX_CENTER": {"info_key": "led_matrix.center_point", "value_type": "array.int"},
79 "LED_MATRIX_KEYRELEASES": {"info_key": "led_matrix.react_on_keyup", "value_type": "bool"}, 78 "LED_MATRIX_KEYRELEASES": {"info_key": "led_matrix.react_on_keyup", "value_type": "bool"},
80 "LED_MATRIX_LED_FLUSH_LIMIT": {"info_key": "led_matrix.led_flush_limit", "value_type": "int"}, 79 "LED_MATRIX_LED_FLUSH_LIMIT": {"info_key": "led_matrix.led_flush_limit", "value_type": "int"},
81 "LED_MATRIX_LED_PROCESS_LIMIT": {"info_key": "led_matrix.led_process_limit", "value_type": "int", "to_json": false}, 80 "LED_MATRIX_LED_PROCESS_LIMIT": {"info_key": "led_matrix.led_process_limit", "value_type": "int", "to_json": false},
82 "LED_MATRIX_MAXIMUM_BRIGHTNESS": {"info_key": "led_matrix.max_brightness", "value_type": "int"}, 81 "LED_MATRIX_MAXIMUM_BRIGHTNESS": {"info_key": "led_matrix.max_brightness", "value_type": "int"},
82 "LED_MATRIX_SLEEP": {"info_key": "led_matrix.sleep", "value_type": "bool"},
83 "LED_MATRIX_SPD_STEP": {"info_key": "led_matrix.speed_steps", "value_type": "int"}, 83 "LED_MATRIX_SPD_STEP": {"info_key": "led_matrix.speed_steps", "value_type": "int"},
84 "LED_MATRIX_SPLIT": {"info_key": "led_matrix.split_count", "value_type": "array.int"}, 84 "LED_MATRIX_SPLIT": {"info_key": "led_matrix.split_count", "value_type": "array.int"},
85 "LED_MATRIX_TIMEOUT": {"info_key": "led_matrix.timeout", "value_type": "int"}, 85 "LED_MATRIX_TIMEOUT": {"info_key": "led_matrix.timeout", "value_type": "int"},
@@ -218,7 +218,8 @@
218 "DEBOUNCING_DELAY": {"info_key": "_invalid.debouncing_delay", "invalid": true, "replace_with": "DEBOUNCE"}, 218 "DEBOUNCING_DELAY": {"info_key": "_invalid.debouncing_delay", "invalid": true, "replace_with": "DEBOUNCE"},
219 "DESCRIPTION": {"info_key": "_invalid.usb_description", "invalid": true}, 219 "DESCRIPTION": {"info_key": "_invalid.usb_description", "invalid": true},
220 "IGNORE_MOD_TAP_INTERRUPT": {"info_key": "_invalid.ignore_mod_tap_interrupt", "value_type": "bool", "invalid": true}, 220 "IGNORE_MOD_TAP_INTERRUPT": {"info_key": "_invalid.ignore_mod_tap_interrupt", "value_type": "bool", "invalid": true},
221 "IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true} 221 "IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true},
222 "LED_DISABLE_WHEN_USB_SUSPENDED": {"info_key": "_invalid.led_matrix_sleep", "invalid": true, "replace_with": "LED_MATRIX_SLEEP"},
222 "NO_ACTION_FUNCTION": {"info_key": "_invalid.no_action_function", "invalid": true}, 223 "NO_ACTION_FUNCTION": {"info_key": "_invalid.no_action_function", "invalid": true},
223 "NO_ACTION_MACRO": {"info_key": "_invalid.no_action_macro", "invalid": true}, 224 "NO_ACTION_MACRO": {"info_key": "_invalid.no_action_macro", "invalid": true},
224 "PREVENT_STUCK_MODIFIERS": {"info_key": "_invalid.prevent_stuck_mods", "invalid": true}, 225 "PREVENT_STUCK_MODIFIERS": {"info_key": "_invalid.prevent_stuck_mods", "invalid": true},
diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md
index d803fcf101..9b23ce8884 100644
--- a/docs/feature_led_matrix.md
+++ b/docs/feature_led_matrix.md
@@ -357,7 +357,7 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
357```c 357```c
358#define LED_MATRIX_KEYRELEASES // reactive effects respond to keyreleases (instead of keypresses) 358#define LED_MATRIX_KEYRELEASES // reactive effects respond to keyreleases (instead of keypresses)
359#define LED_MATRIX_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off 359#define LED_MATRIX_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off
360#define LED_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended 360#define LED_MATRIX_SLEEP // turn off effects when suspended
361#define LED_MATRIX_LED_PROCESS_LIMIT (LED_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) 361#define LED_MATRIX_LED_PROCESS_LIMIT (LED_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
362#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) 362#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)
363#define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs 363#define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs
diff --git a/keyboards/input_club/ergodox_infinity/config.h b/keyboards/input_club/ergodox_infinity/config.h
index 3757ca3d60..f9cd406637 100644
--- a/keyboards/input_club/ergodox_infinity/config.h
+++ b/keyboards/input_club/ergodox_infinity/config.h
@@ -46,7 +46,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
46#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 46#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
47#define LED_MATRIX_LED_COUNT 76 47#define LED_MATRIX_LED_COUNT 76
48#define LED_MATRIX_SPLIT { 38, 38 } 48#define LED_MATRIX_SPLIT { 38, 38 }
49#define LED_DISABLE_WHEN_USB_SUSPENDED 49#define LED_MATRIX_SLEEP
50 50
51// LED Matrix Animation modes. Explicitly enabled 51// LED Matrix Animation modes. Explicitly enabled
52// For full list of effects, see: 52// For full list of effects, see:
diff --git a/keyboards/input_club/whitefox/config.h b/keyboards/input_club/whitefox/config.h
index 2d6affe84a..2b22fb9852 100644
--- a/keyboards/input_club/whitefox/config.h
+++ b/keyboards/input_club/whitefox/config.h
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
23/* LED matrix driver */ 23/* LED matrix driver */
24#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 24#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
25#define LED_MATRIX_LED_COUNT 71 25#define LED_MATRIX_LED_COUNT 71
26#define LED_DISABLE_WHEN_USB_SUSPENDED 26#define LED_MATRIX_SLEEP
27 27
28/* i2c (for LED matrix) */ 28/* i2c (for LED matrix) */
29#define I2C1_CLOCK_SPEED 400000 29#define I2C1_CLOCK_SPEED 400000
diff --git a/keyboards/keychron/c1_pro/ansi/white/config.h b/keyboards/keychron/c1_pro/ansi/white/config.h
index a8a836c5dd..a2122b3d8e 100644
--- a/keyboards/keychron/c1_pro/ansi/white/config.h
+++ b/keyboards/keychron/c1_pro/ansi/white/config.h
@@ -31,7 +31,7 @@
31 { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } 31 { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
32 32
33/* turn off effects when suspended */ 33/* turn off effects when suspended */
34#define LED_DISABLE_WHEN_USB_SUSPENDED 34#define LED_MATRIX_SLEEP
35 35
36/* Enbale caps_lcok, win os and mac os indicator */ 36/* Enbale caps_lcok, win os and mac os indicator */
37#define CAPS_LOCK_LED_INDEX 63 37#define CAPS_LOCK_LED_INDEX 63
diff --git a/keyboards/keychron/c2_pro/ansi/white/config.h b/keyboards/keychron/c2_pro/ansi/white/config.h
index 26c812ffef..531aeea0ec 100644
--- a/keyboards/keychron/c2_pro/ansi/white/config.h
+++ b/keyboards/keychron/c2_pro/ansi/white/config.h
@@ -33,7 +33,7 @@
33#define WIN_LED_INDEX 19 33#define WIN_LED_INDEX 19
34 34
35/* turn off effects when suspended */ 35/* turn off effects when suspended */
36#define LED_DISABLE_WHEN_USB_SUSPENDED 36#define LED_MATRIX_SLEEP
37 37
38// LED Matrix Animation modes. Explicitly enabled 38// LED Matrix Animation modes. Explicitly enabled
39// For full list of effects, see: 39// For full list of effects, see:
diff --git a/keyboards/keychron/s1/ansi/white/config.h b/keyboards/keychron/s1/ansi/white/config.h
index fbe02caeb1..80ef399047 100644
--- a/keyboards/keychron/s1/ansi/white/config.h
+++ b/keyboards/keychron/s1/ansi/white/config.h
@@ -27,7 +27,7 @@
27 // { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 } // 127mA 27 // { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 } // 127mA
28 28
29/* Disable LED lighting when PC is in suspend */ 29/* Disable LED lighting when PC is in suspend */
30#define LED_DISABLE_WHEN_USB_SUSPENDED 30#define LED_MATRIX_SLEEP
31 31
32/* Enable caps-lock LED */ 32/* Enable caps-lock LED */
33#define CAPS_LOCK_LED_INDEX 46 33#define CAPS_LOCK_LED_INDEX 46
diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h
index d2e76f1de0..d9ef8f0f9d 100644
--- a/keyboards/terrazzo/config.h
+++ b/keyboards/terrazzo/config.h
@@ -22,7 +22,7 @@
22#define LED_MATRIX_ROWS 15 22#define LED_MATRIX_ROWS 15
23#define LED_MATRIX_COLS 7 23#define LED_MATRIX_COLS 7
24#define LED_MATRIX_MAXIMUM_BRIGHTNESS 20 24#define LED_MATRIX_MAXIMUM_BRIGHTNESS 20
25#define LED_DISABLE_WHEN_USB_SUSPENDED 25#define LED_MATRIX_SLEEP
26 26
27// LED Matrix Animation modes. Explicitly enabled 27// LED Matrix Animation modes. Explicitly enabled
28// For full list of effects, see: 28// For full list of effects, see:
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c
index eee43d9281..760a8b7484 100644
--- a/quantum/led_matrix/led_matrix.c
+++ b/quantum/led_matrix/led_matrix.c
@@ -434,7 +434,7 @@ void led_matrix_init(void) {
434} 434}
435 435
436void led_matrix_set_suspend_state(bool state) { 436void led_matrix_set_suspend_state(bool state) {
437#ifdef LED_DISABLE_WHEN_USB_SUSPENDED 437#ifdef LED_MATRIX_SLEEP
438 if (state && !suspend_state && is_keyboard_master()) { // only run if turning off, and only once 438 if (state && !suspend_state && is_keyboard_master()) { // only run if turning off, and only once
439 led_task_render(0); // turn off all LEDs when suspending 439 led_task_render(0); // turn off all LEDs when suspending
440 led_task_flush(0); // and actually flash led state to LEDs 440 led_task_flush(0); // and actually flash led state to LEDs