From ddf1759dbebda91bcc550191cf779292da5653fc Mon Sep 17 00:00:00 2001 From: Mathias Andersson Date: Mon, 20 May 2013 21:06:08 +0200 Subject: [PATCH] Fixes to sleep LED. Add help text. Add missing SLEEP_LED_ENABLE checks. --- common/command.c | 5 +++++ protocol/pjrc/usb.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/common/command.c b/common/command.c index b7925794..74b7c5eb 100644 --- a/common/command.c +++ b/common/command.c @@ -106,6 +106,9 @@ static void command_common_help(void) print("x: toggle matrix debug\n"); print("k: toggle keyboard debug\n"); print("m: toggle mouse debug\n"); +#ifdef SLEEP_LED_ENABLE + print("z: toggle sleep LED test\n"); +#endif print("v: print device version & info\n"); print("t: print timer count\n"); print("s: print status\n"); @@ -153,12 +156,14 @@ static bool command_common(uint8_t code) { static host_driver_t *host_driver = 0; 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()); break; +#endif #ifdef BOOTMAGIC_ENABLE case KC_E: print("eeconfig:\n"); diff --git a/protocol/pjrc/usb.c b/protocol/pjrc/usb.c index 0a5436de..902f9f7f 100644 --- a/protocol/pjrc/usb.c +++ b/protocol/pjrc/usb.c @@ -34,7 +34,9 @@ #include "led.h" #include "print.h" #include "util.h" +#ifdef SLEEP_LED_ENABLE #include "sleep_led.h" +#endif #include "suspend.h" -- 2.39.3