]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboards/dz60/dz60.c
Usbasploader bootloader option addition (#6304)
[qmk_firmware.git] / keyboards / dz60 / dz60.c
index 8005b3bebd1f5eb2005615b501babaa58c1be2b9..8295fb432c7104e594146190282a4c842fe7f384 100644 (file)
@@ -16,11 +16,17 @@ void matrix_scan_kb(void) {
 
 void led_init_ports(void) {
   // Set caps lock LED pin as output
-  DDRB |= (1<<2);
+  DDRB |= (1 << 2);
+  // Default to off
+  PORTB |= (1 << 2);
 }
 
 void led_set_kb(uint8_t usb_led) {
-  // Code for caps lock LED as reported by the OS
-  // Set this per keymap, instead of globally
-  led_set_user(usb_led);
+    if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+        PORTB &= ~(1 << 2);
+    } else {
+        PORTB |= (1 << 2);
+    }
+
+    led_set_user(usb_led);
 }