Add new HID_DESCRIPTOR_VENDOR() macro, change over all projects and Device ClassDriver demos to use it.
Fix reversed byte ordering of multi-byte HID data. Added support to the HID parser for extended USAGE items that contain the usage page as well as the usage index. Removed the HID_IOF_NON_VOLATILE and HID_IOF_VOLATILE flags from HID INPUT items where the flag is invalid. Changed over HID OUTPUT items to use HID_IOF_NON_VOLATILE. Change over MagStripe project to use HID_DESCRIPTOR_KEYBOARD() for its HID report. Change over MouseHostDevice demo to use HID_DESCRIPTOR_MOUSE() for its HID report.
This commit is contained in:
parent
a852ea8e43
commit
e6dc951630
24 changed files with 257 additions and 286 deletions
|
@ -57,22 +57,14 @@
|
|||
*/
|
||||
USB_Descriptor_HIDReport_Datatype_t PROGMEM GenericReport[] =
|
||||
{
|
||||
HID_RI_USAGE_PAGE(16, 0x00FF), /* Vendor Page 1 */
|
||||
HID_RI_USAGE(8, 0x01), /* Vendor Usage 1 */
|
||||
HID_RI_COLLECTION(8, 0x01), /* Vendor Usage 1 */
|
||||
HID_RI_USAGE(8, 0x02), /* Vendor Usage 2 */
|
||||
HID_RI_LOGICAL_MINIMUM(8, 0x00),
|
||||
HID_RI_LOGICAL_MAXIMUM(8, 0xFF),
|
||||
HID_RI_REPORT_SIZE(8, 0x08),
|
||||
HID_RI_REPORT_COUNT(8, GENERIC_REPORT_SIZE),
|
||||
HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_VOLATILE),
|
||||
HID_RI_USAGE(8, 0x03), /* Vendor Usage 3 */
|
||||
HID_RI_LOGICAL_MINIMUM(8, 0x00),
|
||||
HID_RI_LOGICAL_MAXIMUM(8, 0xFF),
|
||||
HID_RI_REPORT_SIZE(8, 0x08),
|
||||
HID_RI_REPORT_COUNT(8, GENERIC_REPORT_SIZE),
|
||||
HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_VOLATILE),
|
||||
HID_RI_END_COLLECTION(0),
|
||||
/* Use the HID class driver's standard Joystick report.
|
||||
* Vendor Usage Page: 1
|
||||
* Vendor Collection Usage: 1
|
||||
* Vendor Report IN Usage: 2
|
||||
* Vendor Report OUT Usage: 3
|
||||
* Vendor Report Size: GENERIC_REPORT_SIZE
|
||||
*/
|
||||
HID_DESCRIPTOR_VENDOR(0x00, 0x01, 0x02, 0x03, GENERIC_REPORT_SIZE)
|
||||
};
|
||||
|
||||
/** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue