diff --git a/keyboards/dz60/dz60.c b/keyboards/dz60/dz60.c index 33122846c9f..b54ff011703 100644 --- a/keyboards/dz60/dz60.c +++ b/keyboards/dz60/dz60.c @@ -22,7 +22,13 @@ void led_init_ports(void) { } 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)) { + DDRB |= (1 << 2); + PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); + PORTB &= ~(1 << 2); + } + + led_set_user(usb_led); } diff --git a/keyboards/dz60/keymaps/default/keymap.c b/keyboards/dz60/keymaps/default/keymap.c index fdc2795d245..426b10989d2 100644 --- a/keyboards/dz60/keymaps/default/keymap.c +++ b/keyboards/dz60/keymaps/default/keymap.c @@ -59,11 +59,3 @@ 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); - } -} diff --git a/keyboards/dz60/keymaps/iso_uk/keymap.c b/keyboards/dz60/keymaps/iso_uk/keymap.c index de06d23521b..1c15a59df8c 100644 --- a/keyboards/dz60/keymaps/iso_uk/keymap.c +++ b/keyboards/dz60/keymaps/iso_uk/keymap.c @@ -84,11 +84,3 @@ 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); - } -} diff --git a/keyboards/dz60/keymaps/krusli/keymap.c b/keyboards/dz60/keymaps/krusli/keymap.c index c79cb7f9101..36e7b801a39 100644 --- a/keyboards/dz60/keymaps/krusli/keymap.c +++ b/keyboards/dz60/keymaps/krusli/keymap.c @@ -19,11 +19,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_NO, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) }; - -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); - } -}