summaryrefslogtreecommitdiff
path: root/ps2_vusb/host.h
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2011-02-03 13:26:44 +0900
committertmk <nobody@nowhere>2011-02-22 03:08:52 +0900
commit0632618d29dfb30c76b4e7c310dc7bee36919f63 (patch)
tree8a5b0bab7a1b46b83943e3676cf868137fd91fa7 /ps2_vusb/host.h
parent4f5f1a53d449172263e83c5769c92976e0d3332e (diff)
downloadqmk_firmware-0632618d29dfb30c76b4e7c310dc7bee36919f63.tar.gz
qmk_firmware-0632618d29dfb30c76b4e7c310dc7bee36919f63.zip
added initial support of mousekeys to ps2_vusb
Diffstat (limited to 'ps2_vusb/host.h')
-rw-r--r--ps2_vusb/host.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/ps2_vusb/host.h b/ps2_vusb/host.h
new file mode 100644
index 0000000000..b4b9eefbe1
--- /dev/null
+++ b/ps2_vusb/host.h
@@ -0,0 +1,35 @@
+#ifndef HOST_H
+#define HOST_H
+
+#include <stdint.h>
+
+
+#define REPORT_KEYS 6
+#define MOUSE_BTN1 (1<<0)
+#define MOUSE_BTN2 (1<<1)
+#define MOUSE_BTN3 (1<<2)
+#define MOUSE_BTN4 (1<<3)
+#define MOUSE_BTN5 (1<<4)
+
+
+typedef struct {
+ uint8_t mods;
+ uint8_t rserved; // not used
+ uint8_t keys[REPORT_KEYS];
+} report_keyboard_t;
+
+typedef struct {
+ uint8_t buttons;
+ int8_t x;
+ int8_t y;
+/*
+ int8_t v;
+ int8_t h;
+ */
+} report_mouse_t;
+
+
+void host_keyboard_send(report_keyboard_t *report);
+void host_mouse_send(report_mouse_t *report);
+
+#endif