]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - converter/m0110_usb/matrix.c
m0110_usb: Add LED flash on startup
[max/tmk_keyboard.git] / converter / m0110_usb / matrix.c
index c71a4874c264bcf9de70a7c7770207cc7298e9f5..9dcdc0d6d5061d6b5a6a5e0b4c0df68babe5323a 100644 (file)
@@ -64,6 +64,12 @@ void matrix_init(void)
     // initialize matrix state: all keys off
     for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00;
     matrix = _matrix0;
+
+    // LED flash
+    DDRD |= (1<<6); PORTD |= (1<<6);
+    _delay_ms(500);
+    DDRD |= (1<<6); PORTD &= ~(1<<6);
+
     return;
 }
 
@@ -74,31 +80,11 @@ uint8_t matrix_scan(void)
     is_modified = false;
     key = m0110_recv_key();
 
-#ifdef MATRIX_HAS_LOCKING_CAPS
-    // Send Caps key up event
-    if (matrix_is_on(ROW(CAPS), COL(CAPS))) {
-        is_modified = true;
-        register_key(CAPS_BREAK);
-    }
-#endif
     if (key == M0110_NULL) {
         return 0;
     } else if (key == M0110_ERROR) {
         return 0;
     } else {
-#ifdef MATRIX_HAS_LOCKING_CAPS    
-        if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
-            // CAPS LOCK on:
-            // Ignore LockingCaps key down event
-            if (key == CAPS) return 0;
-            // Convert LockingCaps key up event into down event
-            if (key == CAPS_BREAK) key = CAPS;
-        } else {
-            // CAPS LOCK off:
-            // Ignore LockingCaps key up event
-            if (key == CAPS_BREAK) return 0;
-        }
-#endif        
         is_modified = true;
         register_key(key);
     }