aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--converter/adb_usb/matrix.c4
-rw-r--r--protocol/adb.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/converter/adb_usb/matrix.c b/converter/adb_usb/matrix.c
index a616d10e4..ee17f655f 100644
--- a/converter/adb_usb/matrix.c
+++ b/converter/adb_usb/matrix.c
@@ -100,9 +100,7 @@ uint8_t matrix_scan(void)
100 } else if (codes == 0xFFFF) { // power key release 100 } else if (codes == 0xFFFF) { // power key release
101 register_key(0xFF); 101 register_key(0xFF);
102 } else if (key0 == 0xFF) { // error 102 } else if (key0 == 0xFF) { // error
103 if (debug_matrix) print("adb_host_kbd_recv: ERROR(matrix cleared.)\n"); 103 xprintf("adb_host_kbd_recv: ERROR(%02X)\n", codes);
104 // clear matrix to unregister all keys
105 for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
106 return key1; 104 return key1;
107 } else { 105 } else {
108 register_key(key0); 106 register_key(key0);
diff --git a/protocol/adb.c b/protocol/adb.c
index 2baad3234..e4e26b7d7 100644
--- a/protocol/adb.c
+++ b/protocol/adb.c
@@ -40,6 +40,7 @@ POSSIBILITY OF SUCH DAMAGE.
40#include <avr/io.h> 40#include <avr/io.h>
41#include <avr/interrupt.h> 41#include <avr/interrupt.h>
42#include "adb.h" 42#include "adb.h"
43#include "debug.h"
43 44
44 45
45static inline void data_lo(void); 46static inline void data_lo(void);
@@ -93,6 +94,7 @@ uint16_t adb_host_kbd_recv(void)
93 } 94 }
94 if (!read_bit()) { // Startbit(1) 95 if (!read_bit()) { // Startbit(1)
95 // Service Request 96 // Service Request
97 dprintf("Startbit ERROR\n");
96 return -2; 98 return -2;
97 } 99 }
98 100
@@ -104,6 +106,7 @@ uint16_t adb_host_kbd_recv(void)
104 sei(); 106 sei();
105 107
106 if (stop) { 108 if (stop) {
109 dprintf("Stopbit ERROR\n");
107 return -3; 110 return -3;
108 } 111 }
109 return data; 112 return data;