]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
next_usb: Change LEDs usage for CapsLock status
authortmk <hasu@tmk-kbd.com>
Sun, 20 Sep 2015 01:43:12 +0000 (10:43 +0900)
committertmk <hasu@tmk-kbd.com>
Sun, 20 Sep 2015 01:43:12 +0000 (10:43 +0900)
converter/next_usb/led.c
converter/next_usb/matrix.c

index 24db15e16acaa7386628eb9dc075dca5ed075397..2bd0ef6dd4f1b152eb931a907c868e4e36b522ff 100644 (file)
@@ -47,9 +47,14 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #include "stdint.h"
 #include "led.h"
+#include "next_kbd.h"
 
 
 void led_set(uint8_t usb_led)
 {
-
+    if (usb_led &  (1<<USB_LED_CAPS_LOCK)) {
+        next_kbd_set_leds(true, true);
+    } else {
+        next_kbd_set_leds(false, false);
+    }
 }
index fd6eb9d64fe5f19838ad26784f0869b8ca7c34c8..506378d9046aeebb87f2295535875ac1b10cc0c3 100644 (file)
@@ -194,10 +194,12 @@ uint8_t matrix_scan(void)
     
     NEXT_KBD_LED1_ON;
     
+#ifdef NEXT_KBD_SHIFT_FLASH_LEDS
     next_kbd_set_leds(
         NEXT_KBD_PRESSED_SHIFT_LEFT(resp) ? true : false, 
         NEXT_KBD_PRESSED_SHIFT_RGHT(resp) ? true : false
     );
+#endif
     
     dprintf("[ r=%04lX keycode=%02X pressed=%X CTRL=%X SHIFT_LEFT=%X SHIFT_RGHT=%X CMD_LEFT=%X CMD_RGHT=%X ALT_LEFT=%X ALT_RGHT=%X ]\n", \
         resp, \