summaryrefslogtreecommitdiffstats
path: root/protocol
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2012-10-17 03:44:01 +0900
committertmk <nobody@nowhere>2012-10-17 15:55:37 +0900
commit30eb3e3520e9d4d7b9a9dbac0c5c0200485103c2 (patch)
treec95f8e39411cf05e5f393948b3a3a1b85deec5b9 /protocol
parent8f7ed2bc1902cdeeb78c49f4833816a33cd6d3a0 (diff)
Add command console and mouseky parameters tweak.
Diffstat (limited to 'protocol')
-rw-r--r--protocol/vusb/vusb.c10
1 files changed, 5 insertions, 5 deletions
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");
+ }
}
}
}