core: Fix sleep_led
This commit is contained in:
parent
e7b8da47ce
commit
5969d6267f
4 changed files with 29 additions and 20 deletions
|
|
@ -182,14 +182,22 @@ static bool command_common(uint8_t code)
|
|||
{
|
||||
#ifdef KEYBOARD_LOCK_ENABLE
|
||||
static host_driver_t *host_driver = 0;
|
||||
#endif
|
||||
#ifdef SLEEP_LED_ENABLE
|
||||
static bool sleep_led_test = false;
|
||||
#endif
|
||||
switch (code) {
|
||||
#ifdef SLEEP_LED_ENABLE
|
||||
case KC_Z:
|
||||
// test breathing sleep LED
|
||||
print("Sleep LED test\n");
|
||||
sleep_led_toggle();
|
||||
led_set(host_keyboard_leds());
|
||||
if (sleep_led_test) {
|
||||
sleep_led_disable();
|
||||
led_set(host_keyboard_leds());
|
||||
} else {
|
||||
sleep_led_enable();
|
||||
}
|
||||
sleep_led_test = !sleep_led_test;
|
||||
break;
|
||||
#endif
|
||||
#ifdef BOOTMAGIC_ENABLE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue