]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboards/clueboard/2x1800/2x1800.c
Clueboard refresh (#4902)
[qmk_firmware.git] / keyboards / clueboard / 2x1800 / 2x1800.c
index 4ad78899fc326e6870eae4ba8c901c20bf543179..09c90adbcf6918b4dfd178c1aa395b368c36ab16 100644 (file)
@@ -21,10 +21,6 @@ void matrix_init_kb(void) {
        DDRB |= (1<<5);  // Capslock
        DDRB |= (1<<6);  // Scroll Lock
 
-       // JTAG disable for PORT F. write JTD bit twice within four cycles.
-       MCUCR |= (1<<JTD);
-       MCUCR |= (1<<JTD);
-
        // Run the keymap level init
        matrix_init_user();
 }
@@ -38,25 +34,24 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
 }
 
 void led_set_kb(uint8_t usb_led) {
+  // Toggle numlock as needed
        if (usb_led & (1<<USB_LED_NUM_LOCK)) {
-               // Turn numlock on
                PORTB |= (1<<4);
        } else {
-               // Turn numlock off
                PORTB &= ~(1<<4);
        }
+
+  // Toggle capslock as needed
        if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
-               // Turn capslock on
                PORTB |= (1<<5);
        } else {
-               // Turn capslock off
                PORTB &= ~(1<<5);
        }
+
+       // Toggle scrolllock as needed
        if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
-               // Turn scroll lock on
                PORTB |= (1<<6);
        } else {
-               // Turn scroll lock off
                PORTB &= ~(1<<6);
        }
 }