Subversion Repositories group.electronics

Rev

Rev 28 | Details | Compare with Previous | Last modification | View Log | RSS feed

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