Subversion Repositories group.electronics

Rev

Rev 21 | Rev 26 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21 pfowler 1
#include <avr/pgmspace.h>
2
 
24 pfowler 3
PROGMEM char usbHidReportDescriptor[58] = {
21 pfowler 4
    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
24 pfowler 5
    0x09, 0x04,                    // USAGE (Joystick)
21 pfowler 6
    0xa1, 0x01,                    // COLLECTION (Application)
7
    0x09, 0x01,                    //   USAGE (Pointer)
8
    0xa1, 0x00,                    //   COLLECTION (Physical)
9
    0x09, 0x30,                    //     USAGE (X)
10
    0x09, 0x31,                    //     USAGE (Y)
24 pfowler 11
    0x15, 0x81,                    //     LOGICAL_MINIMUM (-127)
12
    0x25, 0x7f,                    //     LOGICAL_MAXIMUM (127)
13
    0x75, 0x02,                    //     REPORT_SIZE (8)
21 pfowler 14
    0x95, 0x02,                    //     REPORT_COUNT (2)
15
    0x81, 0x02,                    //     INPUT (Data,Var,Abs)
16
    0xc0,                          //   END_COLLECTION
24 pfowler 17
 
21 pfowler 18
    0x05, 0x09,                    //   USAGE_PAGE (Button)
19
    0x19, 0x01,                    //   USAGE_MINIMUM (Button 1)
24 pfowler 20
    0x29, 0x08,                    //   USAGE_MAXIMUM (Button 8)
21 pfowler 21
    0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
22
    0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
23
    0x75, 0x01,                    //   REPORT_SIZE (1)
24 pfowler 24
    0x95, 0x08,                    //   REPORT_COUNT (8)
21 pfowler 25
    0x81, 0x02,                    //   INPUT (Data,Var,Abs)
24 pfowler 26
 
27
    0x05, 0x09,                    //   USAGE_PAGE (Button)
28
    0x19, 0x01,                    //   USAGE_MINIMUM (Button 1)
29
    0x29, 0x10,                    //   USAGE_MAXIMUM (Button 16)
30
    0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
31
    0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
32
    0x75, 0x01,                    //   REPORT_SIZE (1)
33
    0x95, 0x10,                    //   REPORT_COUNT (16)
34
    0x81, 0x02,                    //   INPUT (Data,Var,Abs)
35
 
21 pfowler 36
    0xc0                           // END_COLLECTION
37
};
38
 
39