]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
DZ60: Add Caps Lock LED for default keymap (#2800)
authornariox <pedro.nariyoshI@gmail.com>
Tue, 24 Apr 2018 19:43:23 +0000 (15:43 -0400)
committerDrashna Jaelre <drashna@live.com>
Tue, 24 Apr 2018 19:43:23 +0000 (12:43 -0700)
Commit b546da0 added better init handling, but removed Caps Lock LED handling. This re-adds it (in the right place).

keyboards/dz60/keymaps/default/keymap.c

index ed91cc37739e879959a521b9374d56d3e1b97f97..8d5d1ecb397ee8dc28c6451b96bcd0772b81594a 100644 (file)
@@ -59,3 +59,11 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
       break;
   }
 }
+
+void led_set_user(uint8_t usb_led) {
+    if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+        DDRB |= (1 << 2); PORTB &= ~(1 << 2);
+    } else {
+        DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
+    }
+}