]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Remove clear matrix on ADB recv error
authortmk <nobody@nowhere>
Fri, 4 Oct 2013 06:03:42 +0000 (15:03 +0900)
committertmk <nobody@nowhere>
Fri, 4 Oct 2013 06:03:42 +0000 (15:03 +0900)
converter/adb_usb/matrix.c
protocol/adb.c

index a616d10e40c176fb69e05af205bbc9bec605f8c6..ee17f655f2ddff1dc289f085fafe588404aa74d5 100644 (file)
@@ -100,9 +100,7 @@ uint8_t matrix_scan(void)
     } else if (codes == 0xFFFF) {   // power key release
         register_key(0xFF);
     } else if (key0 == 0xFF) {      // error
-        if (debug_matrix) print("adb_host_kbd_recv: ERROR(matrix cleared.)\n");
-        // clear matrix to unregister all keys
-        for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
+        xprintf("adb_host_kbd_recv: ERROR(%02X)\n", codes);
         return key1;
     } else {
         register_key(key0);
index 2baad32340e621f53760f7d5b9ff0a6a0c994e87..e4e26b7d7b90fb5a5da5f4ae7b03023b29c867f9 100644 (file)
@@ -40,6 +40,7 @@ POSSIBILITY OF SUCH DAMAGE.
 #include <avr/io.h>
 #include <avr/interrupt.h>
 #include "adb.h"
+#include "debug.h"
 
 
 static inline void data_lo(void);
@@ -93,6 +94,7 @@ uint16_t adb_host_kbd_recv(void)
     }
     if (!read_bit()) {          // Startbit(1)
         // Service Request
+        dprintf("Startbit ERROR\n");
         return -2;
     }
 
@@ -104,6 +106,7 @@ uint16_t adb_host_kbd_recv(void)
     sei();
 
     if (stop) {
+        dprintf("Stopbit ERROR\n");
         return -3;
     }
     return data;