Rename LED_DISABLE_WHEN_USB_SUSPENDED
-> LED_MATRIX_SLEEP
(#22681)
This commit is contained in:
parent
b9e81c0691
commit
73758d3d3a
@ -74,12 +74,12 @@
|
|||||||
"LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"},
|
"LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"},
|
||||||
|
|
||||||
// LED Matrix
|
// 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_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_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_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_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_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_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_SPLIT": {"info_key": "led_matrix.split_count", "value_type": "array.int"},
|
||||||
"LED_MATRIX_TIMEOUT": {"info_key": "led_matrix.timeout", "value_type": "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"},
|
"DEBOUNCING_DELAY": {"info_key": "_invalid.debouncing_delay", "invalid": true, "replace_with": "DEBOUNCE"},
|
||||||
"DESCRIPTION": {"info_key": "_invalid.usb_description", "invalid": true},
|
"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": {"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_FUNCTION": {"info_key": "_invalid.no_action_function", "invalid": true},
|
||||||
"NO_ACTION_MACRO": {"info_key": "_invalid.no_action_macro", "invalid": true},
|
"NO_ACTION_MACRO": {"info_key": "_invalid.no_action_macro", "invalid": true},
|
||||||
"PREVENT_STUCK_MODIFIERS": {"info_key": "_invalid.prevent_stuck_mods", "invalid": true},
|
"PREVENT_STUCK_MODIFIERS": {"info_key": "_invalid.prevent_stuck_mods", "invalid": true},
|
||||||
|
@ -357,7 +357,7 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
|
|||||||
```c
|
```c
|
||||||
#define LED_MATRIX_KEYRELEASES // reactive effects respond to keyreleases (instead of keypresses)
|
#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_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_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_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
|
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs
|
||||||
|
@ -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 IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
|
||||||
#define LED_MATRIX_LED_COUNT 76
|
#define LED_MATRIX_LED_COUNT 76
|
||||||
#define LED_MATRIX_SPLIT { 38, 38 }
|
#define LED_MATRIX_SPLIT { 38, 38 }
|
||||||
#define LED_DISABLE_WHEN_USB_SUSPENDED
|
#define LED_MATRIX_SLEEP
|
||||||
|
|
||||||
// LED Matrix Animation modes. Explicitly enabled
|
// LED Matrix Animation modes. Explicitly enabled
|
||||||
// For full list of effects, see:
|
// For full list of effects, see:
|
||||||
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* LED matrix driver */
|
/* LED matrix driver */
|
||||||
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
|
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
|
||||||
#define LED_MATRIX_LED_COUNT 71
|
#define LED_MATRIX_LED_COUNT 71
|
||||||
#define LED_DISABLE_WHEN_USB_SUSPENDED
|
#define LED_MATRIX_SLEEP
|
||||||
|
|
||||||
/* i2c (for LED matrix) */
|
/* i2c (for LED matrix) */
|
||||||
#define I2C1_CLOCK_SPEED 400000
|
#define I2C1_CLOCK_SPEED 400000
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
|
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
|
||||||
|
|
||||||
/* turn off effects when suspended */
|
/* turn off effects when suspended */
|
||||||
#define LED_DISABLE_WHEN_USB_SUSPENDED
|
#define LED_MATRIX_SLEEP
|
||||||
|
|
||||||
/* Enbale caps_lcok, win os and mac os indicator */
|
/* Enbale caps_lcok, win os and mac os indicator */
|
||||||
#define CAPS_LOCK_LED_INDEX 63
|
#define CAPS_LOCK_LED_INDEX 63
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#define WIN_LED_INDEX 19
|
#define WIN_LED_INDEX 19
|
||||||
|
|
||||||
/* turn off effects when suspended */
|
/* turn off effects when suspended */
|
||||||
#define LED_DISABLE_WHEN_USB_SUSPENDED
|
#define LED_MATRIX_SLEEP
|
||||||
|
|
||||||
// LED Matrix Animation modes. Explicitly enabled
|
// LED Matrix Animation modes. Explicitly enabled
|
||||||
// For full list of effects, see:
|
// For full list of effects, see:
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
// { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 } // 127mA
|
// { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 } // 127mA
|
||||||
|
|
||||||
/* Disable LED lighting when PC is in suspend */
|
/* Disable LED lighting when PC is in suspend */
|
||||||
#define LED_DISABLE_WHEN_USB_SUSPENDED
|
#define LED_MATRIX_SLEEP
|
||||||
|
|
||||||
/* Enable caps-lock LED */
|
/* Enable caps-lock LED */
|
||||||
#define CAPS_LOCK_LED_INDEX 46
|
#define CAPS_LOCK_LED_INDEX 46
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define LED_MATRIX_ROWS 15
|
#define LED_MATRIX_ROWS 15
|
||||||
#define LED_MATRIX_COLS 7
|
#define LED_MATRIX_COLS 7
|
||||||
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 20
|
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 20
|
||||||
#define LED_DISABLE_WHEN_USB_SUSPENDED
|
#define LED_MATRIX_SLEEP
|
||||||
|
|
||||||
// LED Matrix Animation modes. Explicitly enabled
|
// LED Matrix Animation modes. Explicitly enabled
|
||||||
// For full list of effects, see:
|
// For full list of effects, see:
|
||||||
|
@ -434,7 +434,7 @@ void led_matrix_init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void led_matrix_set_suspend_state(bool state) {
|
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
|
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_render(0); // turn off all LEDs when suspending
|
||||||
led_task_flush(0); // and actually flash led state to LEDs
|
led_task_flush(0); // and actually flash led state to LEDs
|
||||||
|
Loading…
Reference in New Issue
Block a user