diff options
author | tmk <nobody@nowhere> | 2011-02-09 00:03:58 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2011-02-22 03:08:59 +0900 |
commit | acc974c64b1e17e6807133fdc50de5bb34aedda5 (patch) | |
tree | 7af7511a56d680a4d93b535c52891a8ffc15dd04 /host.h | |
parent | 5552b5afeaa9ce7432f9ded3586984253f292d80 (diff) |
added protocol stack: pjrc, vusb
Diffstat (limited to 'host.h')
-rw-r--r-- | host.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/host.h b/host.h new file mode 100644 index 0000000000..fa7e79910b --- /dev/null +++ b/host.h @@ -0,0 +1,36 @@ +#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; + + +extern uint8_t host_keyboard_led; +void host_keyboard_send(report_keyboard_t *report); +void host_mouse_send(report_mouse_t *report); + +#endif |