summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 @@
"LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"},
// LED Matrix
- "LED_DISABLE_WHEN_USB_SUSPENDED": {"info_key": "led_matrix.sleep", "value_type": "bool"},
"LED_MATRIX_CENTER": {"info_key": "led_matrix.center_point", "value_type": "array.int"},
"LED_MATRIX_KEYRELEASES": {"info_key": "led_matrix.react_on_keyup", "value_type": "bool"},
"LED_MATRIX_LED_FLUSH_LIMIT": {"info_key": "led_matrix.led_flush_limit", "value_type": "int"},
"LED_MATRIX_LED_PROCESS_LIMIT": {"info_key": "led_matrix.led_process_limit", "value_type": "int", "to_json": false},
"LED_MATRIX_MAXIMUM_BRIGHTNESS": {"info_key": "led_matrix.max_brightness", "value_type": "int"},
+ "LED_MATRIX_SLEEP": {"info_key": "led_matrix.sleep", "value_type": "bool"},
"LED_MATRIX_SPD_STEP": {"info_key": "led_matrix.speed_steps", "value_type": "int"},
"LED_MATRIX_SPLIT": {"info_key": "led_matrix.split_count", "value_type": "array.int"},
"LED_MATRIX_TIMEOUT": {"info_key": "led_matrix.timeout", "value_type": "int"},
@@ -218,7 +218,8 @@
"DEBOUNCING_DELAY": {"info_key": "_invalid.debouncing_delay", "invalid": true, "replace_with": "DEBOUNCE"},
"DESCRIPTION": {"info_key": "_invalid.usb_description", "invalid": true},
"IGNORE_MOD_TAP_INTERRUPT": {"info_key": "_invalid.ignore_mod_tap_interrupt", "value_type": "bool", "invalid": true},
- "IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true}
+ "IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true},
+ "LED_DISABLE_WHEN_USB_SUSPENDED": {"info_key": "_invalid.led_matrix_sleep", "invalid": true, "replace_with": "LED_MATRIX_SLEEP"},
"NO_ACTION_FUNCTION": {"info_key": "_invalid.no_action_function", "invalid": true},
"NO_ACTION_MACRO": {"info_key": "_invalid.no_action_macro", "invalid": true},
"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_
```c
#define LED_MATRIX_KEYRELEASES // reactive effects respond to keyreleases (instead of keypresses)
#define LED_MATRIX_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off
-#define LED_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
+#define LED_MATRIX_SLEEP // turn off effects when suspended
#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)
#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
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/>.
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
#define LED_MATRIX_LED_COUNT 76
#define LED_MATRIX_SPLIT { 38, 38 }
-#define LED_DISABLE_WHEN_USB_SUSPENDED
+#define LED_MATRIX_SLEEP
// LED Matrix Animation modes. Explicitly enabled
// 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/>.
/* LED matrix driver */
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
#define LED_MATRIX_LED_COUNT 71
-#define LED_DISABLE_WHEN_USB_SUSPENDED
+#define LED_MATRIX_SLEEP
/* i2c (for LED matrix) */
#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 @@
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
/* turn off effects when suspended */
-#define LED_DISABLE_WHEN_USB_SUSPENDED
+#define LED_MATRIX_SLEEP
/* Enbale caps_lcok, win os and mac os indicator */
#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 @@
#define WIN_LED_INDEX 19
/* turn off effects when suspended */
-#define LED_DISABLE_WHEN_USB_SUSPENDED
+#define LED_MATRIX_SLEEP
// LED Matrix Animation modes. Explicitly enabled
// 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 @@
// { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 } // 127mA
/* Disable LED lighting when PC is in suspend */
-#define LED_DISABLE_WHEN_USB_SUSPENDED
+#define LED_MATRIX_SLEEP
/* Enable caps-lock LED */
#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 @@
#define LED_MATRIX_ROWS 15
#define LED_MATRIX_COLS 7
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 20
-#define LED_DISABLE_WHEN_USB_SUSPENDED
+#define LED_MATRIX_SLEEP
// LED Matrix Animation modes. Explicitly enabled
// 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) {
}
void led_matrix_set_suspend_state(bool state) {
-#ifdef LED_DISABLE_WHEN_USB_SUSPENDED
+#ifdef LED_MATRIX_SLEEP
if (state && !suspend_state && is_keyboard_master()) { // only run if turning off, and only once
led_task_render(0); // turn off all LEDs when suspending
led_task_flush(0); // and actually flash led state to LEDs