You have to be aware of Usage Types.
Depending on Usage Type, Logical min/max and Input flags alters.
As of the details of Usage Types, refer to "3.4.1 Usage Types (Controls)" section in "HID Usage Tables 1.12" on USB.org
http://www.usb.org/develo...ass_docs/Hut1_12v2.pdfa) One Shot Control (OSC)These Usages are assigned to OSC.
- Play/Pause
- Stop
- Quit
For this Usage Type,
- Logical min/max (0/1)
- Input flags (Relative, Preferred State)
On/Off Control (OOC)These Usages are assigned to OOC.
- Fast Forward
- Rewind
There are three options for this type
1. two buttons (On and Off)
- Logical min/max (-1/1)
- Input flags (Relative, No Preferred)
2. one push button, which toggles state at every push
- Logical min/max (0/1)
- Input flags (Relative, Preferred State)
3. one push button, momentary switch
- Logical min/max (0/1)
- Input flags (Absolute, No Preferred)
The third option fits to above Usages
Selector (Sel)These Usages are Selectors, which belong to "Application Launch Buttons" (Usage: 0x0180)
- AL Consumer Control Configuration
- AL Desktop
This Usage is also a Selector, which belongs to "Generic GUI Application Controls" (Usage: 0x0200)
- AC Exit
Selectors are defined in a separate Named Array collection.
Refer to "A.4 Named Array Field" section of Hut1_12v2.pdf
char ReportDescriptor[68] = {
0x05, 0x0c, // USAGE_PAGE (Consumer Devices)
0x09, 0x01, // USAGE (Consumer Control)
0xa1, 0x01, // COLLECTION (Application)
// OSC usages
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x03, // REPORT_COUNT (3)
0x09, 0xcd, // USAGE (Play/Pause)
0x09, 0xb7, // USAGE (Stop)
0x09, 0x94, // USAGE (Quit)
0x81, 0x06, // INPUT (Data,Var,Rel)
// OOC usages
0x95, 0x02, // REPORT_COUNT (2)
0x09, 0xb3, // USAGE (Fast Forward)
0x09, 0xb4, // USAGE (Rewind)
0x81, 0x22, // INPUT (Data,Var,Abs,NPrf)
// Sel usages 1
0x0a, 0x80, 0x01, // USAGE (Application Launch Buttons)
0xa1, 0x02, // COLLECTION (Logical)
0x15, 0x01, // LOGICAL_MINIMUM (1)
0x25, 0x02, // LOGICAL_MAXIMUM (2)
0x75, 0x02, // REPORT_SIZE (2)
0x95, 0x01, // REPORT_COUNT (1)
0x0a, 0x83, 0x01, // USAGE (AL Consumer Control Configuration) - index 1
0x0a, 0xaa, 0x01, // USAGE (AL Desktop) - index 2
0x81, 0x00, // INPUT (Data,Ary,Abs) - index 0 means none of above is selected
0xc0, // END_COLLECTION
// Sel usages 2
0x0a, 0x00, 0x02, // USAGE (Generic GUI Application Controls)
0xa1, 0x02, // COLLECTION (Logical)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x0a, 0x04, 0x02, // USAGE (AC Exit) - index 1
0x81, 0x00, // INPUT (Data,Ary,Abs)
0xc0, // END_COLLECTION
0xc0 // END_COLLECTION
};
Tsuneo