You need to edit the HID report descriptor, but also the main code. Change this portion of the HID descriptor:
0x05, 0x09, /* Usage Page (Button) */
0x09, 0x02, /* Usage (Button 2) */
0x09, 0x01, /* Usage (Button 1) */
0x15, 0x00, /* Logical Minimum (0) */
0x25, 0x01, /* Logical Maximum (1) */
0x75, 0x01, /* Report Size (1) */
0x95, 0x02, /* Report Count (2) */
0x81, 0x02, /* Input (Data, Variable, Absolute) */
0x75, 0x06, /* Report Size (6) */
0x95, 0x01, /* Report Count (1) */
0x81, 0x01, /* Input (Constant) */
0xc0 /* End Collection */
To this:
0x05, 0x09, /* Usage Page (Button) */
0x09, 0x03, /* Usage (Button 3) */
0x09, 0x02, /* Usage (Button 2) */
0x09, 0x01, /* Usage (Button 1) */
0x15, 0x00, /* Logical Minimum (0) */
0x25, 0x01, /* Logical Maximum (1) */
0x75, 0x01, /* Report Size (1) */
0x95, 0x03, /* Report Count (3) */
0x81, 0x02, /* Input (Data, Variable, Absolute) */
0x75, 0x06, /* Report Size (5) */
0x95, 0x01, /* Report Count (1) */
0x81, 0x01, /* Input (Constant) */
0xc0 /* End Collection */
And set the third bit of the Buttons element in the element in the CALLBACK_HID_Device_CreateHIDReport()
function of the main source file, i.e. to "push" the new third button, use:
if (ButtonStatus_LCL & BUTTONS_BUTTON1)
JoystickReport->Button |= (1 << 2);
If I recall correctly, the Physical Min and Max are just "window dressing" so to speak. From the HID spec:
While Logical Minimum and Logical Maximum (extents) bound the values
returned by a device, Physical Minimum and Physical Maximum give
meaning to those bounds by allowing the report value to be offset and
scaled. For example, a thermometer might have logical extents of 0 and
999 but physical extents of 32 and 212 degrees.The resolution can be
determined with the following algorithm:
So for this example, the HID thermometer would be returning a value between 0-999 in the report. That's the bytes that actually flow from device to PC through an IN endpoint. These values are determined by the Logical Min/Max.
The Physical Min/Max describes how the Logical units map onto a Physical "spectrum". In this case, from water's freezing (32 degrees F) to the boiling (212 F). In this case, when the device sends a 0, it means 32 F, and when it sends 999, it means 212 F. Software can then read the HID descriptor to determine the mapping.
In the grand scheme of things, physical min/max aren't that meaningful unless you intentionally use them. For consistency, I generally set my physical to match my logical.
Best Answer
Get/Set features are elements of standard (default) control pipe and are common for all USB classes. That't why they are not mentioned in the particular device class specifications.