From 30eb3e3520e9d4d7b9a9dbac0c5c0200485103c2 Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 17 Oct 2012 03:44:01 +0900 Subject: Add command console and mouseky parameters tweak. --- protocol/vusb/vusb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocol') diff --git a/protocol/vusb/vusb.c b/protocol/vusb/vusb.c index 59834e6918..1d5f4a8528 100644 --- a/protocol/vusb/vusb.c +++ b/protocol/vusb/vusb.c @@ -42,12 +42,12 @@ void vusb_transfer_keyboard(void) if (usbInterruptIsReady()) { if (kbuf_head != kbuf_tail) { usbSetInterrupt((void *)&kbuf[kbuf_tail], sizeof(report_keyboard_t)); - if (!debug_keyboard) { - print("keys: "); - for (int i = 0; i < REPORT_KEYS; i++) { phex(kbuf[kbuf_tail].keys[i]); print(" "); } - print(" mods: "); phex((kbuf[kbuf_tail]).mods); print("\n"); - } kbuf_tail = (kbuf_tail + 1) % KBUF_SIZE; + if (debug_keyboard) { + print("V-USB: kbuf["); pdec(kbuf_tail); print("->"); pdec(kbuf_head); print("]("); + phex((kbuf_head < kbuf_tail) ? (KBUF_SIZE - kbuf_tail + kbuf_head) : (kbuf_head - kbuf_tail)); + print(")\n"); + } } } } -- cgit v1.2.3