]> git.gir.st - tmk_keyboard.git/blob - host.h
added protocol stack: pjrc, vusb
[tmk_keyboard.git] / host.h
1 #ifndef HOST_H
2 #define HOST_H
3
4 #include <stdint.h>
5
6
7 #define REPORT_KEYS 6
8 #define MOUSE_BTN1 (1<<0)
9 #define MOUSE_BTN2 (1<<1)
10 #define MOUSE_BTN3 (1<<2)
11 #define MOUSE_BTN4 (1<<3)
12 #define MOUSE_BTN5 (1<<4)
13
14
15 typedef struct {
16 uint8_t mods;
17 uint8_t rserved; // not used
18 uint8_t keys[REPORT_KEYS];
19 } report_keyboard_t;
20
21 typedef struct {
22 uint8_t buttons;
23 int8_t x;
24 int8_t y;
25 /*
26 int8_t v;
27 int8_t h;
28 */
29 } report_mouse_t;
30
31
32 extern uint8_t host_keyboard_led;
33 void host_keyboard_send(report_keyboard_t *report);
34 void host_mouse_send(report_mouse_t *report);
35
36 #endif
Imprint / Impressum