From cb434cfebc607db15b52a42adae6423bd40f1f98 Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 4 Oct 2013 15:03:42 +0900 Subject: [PATCH] Remove clear matrix on ADB recv error --- converter/adb_usb/matrix.c | 4 +--- protocol/adb.c | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/converter/adb_usb/matrix.c b/converter/adb_usb/matrix.c index a616d10e40c..ee17f655f2d 100644 --- a/converter/adb_usb/matrix.c +++ b/converter/adb_usb/matrix.c @@ -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); diff --git a/protocol/adb.c b/protocol/adb.c index 2baad32340e..e4e26b7d7b9 100644 --- a/protocol/adb.c +++ b/protocol/adb.c @@ -40,6 +40,7 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #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;