diff options
author | tmk <nobody@nowhere> | 2012-10-17 03:44:01 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2012-10-17 15:55:37 +0900 |
commit | 30eb3e3520e9d4d7b9a9dbac0c5c0200485103c2 (patch) | |
tree | c95f8e39411cf05e5f393948b3a3a1b85deec5b9 /protocol | |
parent | 8f7ed2bc1902cdeeb78c49f4833816a33cd6d3a0 (diff) |
Add command console and mouseky parameters tweak.
Diffstat (limited to 'protocol')
-rw-r--r-- | protocol/vusb/vusb.c | 10 |
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"); + } } } } |