summaryrefslogtreecommitdiff
path: root/protocol/iwrap/iwrap.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-04-20 00:46:48 +0900
committertmk <nobody@nowhere>2013-04-20 00:46:48 +0900
commit2fc681b4f768484c2ba5cfa22662bf4c09586e57 (patch)
treeead46c28553b5225699d36e416b10ef2c129ae70 /protocol/iwrap/iwrap.c
parent246031b6471a364f082c0eb4a0fb858821ae767b (diff)
parent663027751831eb0e80d64c90aaf82d2921533aed (diff)
Merge branch 'iwrap5'
Diffstat (limited to 'protocol/iwrap/iwrap.c')
-rw-r--r--protocol/iwrap/iwrap.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/protocol/iwrap/iwrap.c b/protocol/iwrap/iwrap.c
index 3cc9ca3061..6a404116a1 100644
--- a/protocol/iwrap/iwrap.c
+++ b/protocol/iwrap/iwrap.c
@@ -334,8 +334,8 @@ static void send_keyboard(report_keyboard_t *report)
// HID raw mode header
xmit(0x9f);
xmit(0x0a); // Length
- xmit(0xa1); // keyboard report
- xmit(0x01);
+ xmit(0xa1); // DATA(Input)
+ xmit(0x01); // Report ID
xmit(report->mods);
xmit(0x00); // reserved byte(always 0)
xmit(report->keys[0]);
@@ -351,15 +351,17 @@ static void send_mouse(report_mouse_t *report)
{
#if defined(MOUSEKEY_ENABLE) || defined(PS2_MOUSE_ENABLE)
if (!iwrap_connected() && !iwrap_check_connection()) return;
- MUX_HEADER(0x01, 0x07);
+ MUX_HEADER(0x01, 0x09);
// HID raw mode header
xmit(0x9f);
- xmit(0x05); // Length
- xmit(0xa1); // mouse report
- xmit(0x02);
+ xmit(0x07); // Length
+ xmit(0xa1); // DATA(Input)
+ xmit(0x02); // Report ID
xmit(report->buttons);
xmit(report->x);
xmit(report->y);
+ xmit(report->v);
+ xmit(report->h);
MUX_FOOTER(0x01);
#endif
}
@@ -457,8 +459,8 @@ static void send_consumer(uint16_t data)
MUX_HEADER(0x01, 0x07);
xmit(0x9f);
xmit(0x05); // Length
- xmit(0xa1); // consumer report
- xmit(0x03);
+ xmit(0xa1); // DATA(Input)
+ xmit(0x03); // Report ID
xmit(bits1);
xmit(bits2);
xmit(bits3);