]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Fixes to sleep LED.
authorMathias Andersson <wraul@dbox.se>
Mon, 20 May 2013 19:06:08 +0000 (21:06 +0200)
committerMathias Andersson <wraul@dbox.se>
Mon, 27 May 2013 16:36:00 +0000 (18:36 +0200)
Add help text.
Add missing SLEEP_LED_ENABLE checks.

common/command.c
protocol/pjrc/usb.c

index b792579475baa38de77fe5ed255e8944104c201b..74b7c5ebcf50fad5e89fc0e5732396e8dc7cb3c1 100644 (file)
@@ -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");
index 0a5436deb4fc67f795d8308ca7fb8a4400aaec6b..902f9f7f7742751657fb35a8ba3da12a9ad0ab50 100644 (file)
@@ -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"