]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - converter/next_usb/matrix.c
lufa: Fix comment on INTERRUPT_CONTROL_ENDPOINT
[max/tmk_keyboard.git] / converter / next_usb / matrix.c
index 506378d9046aeebb87f2295535875ac1b10cc0c3..18395a7eb115f3e996e01b33f77ca4642c629393 100644 (file)
@@ -66,20 +66,6 @@ static uint8_t matrix[MATRIX_ROWS];
 
 static bool is_modified = false;
 
-/* number of matrix rows */
-inline
-uint8_t matrix_rows(void)
-{
-    return MATRIX_ROWS;
-}
-
-/* number of matrix columns */
-inline
-uint8_t matrix_cols(void)
-{
-    return MATRIX_COLS;
-}
-
 #ifndef NEXT_KBD_LED1_ON
 #define NEXT_KBD_LED1_ON
 #endif
@@ -160,7 +146,7 @@ void matrix_init(void)
 /* scan all key states on matrix */
 uint8_t matrix_scan(void)
 {
-    _delay_ms(20);
+    _delay_ms(5);
     
     //next_kbd_set_leds(false, false);
     NEXT_KBD_LED1_OFF;
@@ -187,7 +173,7 @@ uint8_t matrix_scan(void)
     
     uint32_t resp = (next_kbd_recv());
     
-    if (resp == NEXT_KBD_KMBUS_IDLE)
+    if (!resp || resp == NEXT_KBD_KMBUS_IDLE)
     {
         return 0;
     }
@@ -227,19 +213,6 @@ uint8_t matrix_scan(void)
     return 1;
 }
 
-/* whether modified from previous scan. used after matrix_scan. */
-bool matrix_is_modified()
-{
-    return is_modified;
-}
-
-/* whether a switch is on */
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
-    return (matrix[row] & (1<<col));
-}
-
 /* matrix state on row */
 inline
 uint8_t matrix_get_row(uint8_t row)
@@ -247,11 +220,6 @@ uint8_t matrix_get_row(uint8_t row)
     return matrix[row];
 }
 
-/* print matrix for debug */
-void matrix_print(void)
-{
-}
-
 inline
 static void matrix_make(uint8_t code)
 {