117 |
pfowler |
1 |
#include <avr/pgmspace.h>
|
|
|
2 |
|
|
|
3 |
const PROGMEM char usbHidReportDescriptor[HID_SIZE] = {
|
|
|
4 |
|
|
|
5 |
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
|
|
6 |
0x09, 0x06, // USAGE (Keyboard)
|
|
|
7 |
0xa1, 0x01, // COLLECTION (Application)
|
|
|
8 |
0x85, 0x01, // REPORT_ID (1)
|
|
|
9 |
0x05, 0x07, // USAGE_PAGE (Keyboard)
|
|
|
10 |
0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)
|
|
|
11 |
0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)
|
|
|
12 |
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
|
|
13 |
0x25, 0x01, // LOGICAL_MAXIMUM (1)
|
|
|
14 |
0x75, 0x01, // REPORT_SIZE (1)
|
|
|
15 |
0x95, 0x08, // REPORT_COUNT (8)
|
|
|
16 |
0x81, 0x02, // INPUT (Data,Var,Abs)
|
|
|
17 |
|
|
|
18 |
0x95, 0x01, // REPORT_COUNT (1)
|
|
|
19 |
0x75, 0x08, // REPORT_SIZE (8)
|
|
|
20 |
0x25, 0x65, // LOGICAL_MAXIMUM (101)
|
|
|
21 |
0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))
|
|
|
22 |
0x29, 0x65, // USAGE_MAXIMUM (Keyboard Application)
|
|
|
23 |
0x81, 0x00, // INPUT (Data,Ary,Abs) 18 36
|
|
|
24 |
0xc0, // END_COLLECTION 37
|
|
|
25 |
|
|
|
26 |
0x05, 0x01, // USAGE_PAGE (Generic Desktop) 22 44
|
|
|
27 |
0x09, 0x05, // USAGE (Joystick)
|
|
|
28 |
0xa1, 0x01, // COLLECTION (Application)
|
|
|
29 |
0xa1, 0x00, // COLLECTION (Physical)
|
|
|
30 |
0x85, 0x02, // REPORT_ID (2)
|
|
|
31 |
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
|
|
32 |
0x09, 0x30, // USAGE (X)
|
|
|
33 |
0x09, 0x31, // USAGE (Y)
|
|
|
34 |
0x15, 0x81, // LOGICAL_MINIMUM (-127)
|
|
|
35 |
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
|
|
|
36 |
0x75, 0x08, // REPORT_SIZE (8)
|
|
|
37 |
0x95, 0x02, // REPORT_COUNT (2)
|
|
|
38 |
0x81, 0x02, // INPUT (Data,Var,Abs)
|
|
|
39 |
0x05, 0x09, // USAGE_PAGE (Button)
|
|
|
40 |
0x19, 0x01, // USAGE_MINIMUM (Button 1)
|
|
|
41 |
0x29, 0x10, // USAGE_MAXIMUM (Button 16)
|
|
|
42 |
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
|
|
43 |
0x25, 0x01, // LOGICAL_MAXIMUM (1)
|
|
|
44 |
0x75, 0x01, // REPORT_SIZE (1)
|
|
|
45 |
0x95, 0x10, // REPORT_COUNT (16)
|
|
|
46 |
0x81, 0x02, // INPUT (Data,Var,Abs)
|
|
|
47 |
0xc0, // END_COLLECTION
|
|
|
48 |
0xc0 // END_COLLECTION
|
|
|
49 |
};
|
|
|
50 |
|