]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - keyboard/fc980c/fc980c.c
core: Clean up code of Locking key support
[max/tmk_keyboard.git] / keyboard / fc980c / fc980c.c
index 9aaccea8ff97d3d4c9e0617d9a94d78eed756924..6b8fa39b163cd727efb5975a265e5dc996414949 100644 (file)
@@ -46,14 +46,12 @@ void matrix_init(void)
     debug_keyboard = true;
     debug_matrix = true;
 #endif
-    debug_enable = true;
-    debug_matrix = true;
 
     KEY_INIT();
 
     // LEDs on NumLock, CapsLock and ScrollLock(PB4, PB5, PB6)
     DDRB  |= (1<<4) | (1<<5) | (1<<6);
-    PORTB |= (1<<4) | (1<<5) | (1<<6);
+    PORTB &= ~((1<<4) | (1<<5) | (1<<6));
 
     // initialize matrix state: all keys off
     for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00;
@@ -113,7 +111,7 @@ uint8_t matrix_scan(void)
 
             // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE.
             // This takes 25us or more to make sure KEY_STATE returns to idle state.
-            _delay_us(75);
+            _delay_us(30);
         }
         if (matrix[row] ^ matrix_prev[row]) {
             matrix_last_modified = timer_read32();