diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-01-30 14:14:04 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-01-30 14:14:04 +0000 |
commit | e6dc95163094692d11715711d5c1aaa19841dd77 (patch) | |
tree | f3935657b403333b3578581a2d76944cb9218b12 /Demos/DualRole/ClassDriver | |
parent | a852ea8e43d6df9642df3524a974073d2229fa4c (diff) | |
download | lufa-e6dc95163094692d11715711d5c1aaa19841dd77.tar.gz lufa-e6dc95163094692d11715711d5c1aaa19841dd77.tar.bz2 lufa-e6dc95163094692d11715711d5c1aaa19841dd77.zip |
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.
Diffstat (limited to 'Demos/DualRole/ClassDriver')
-rw-r--r-- | Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c b/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c index 39688dc62..541626e5a 100644 --- a/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c +++ b/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c @@ -45,34 +45,15 @@ */ USB_Descriptor_HIDReport_Datatype_t PROGMEM MouseReport[] = { - HID_RI_USAGE_PAGE(8, 0x01), /* Generic Desktop */ - HID_RI_USAGE(8, 0x02), /* Mouse */ - HID_RI_COLLECTION(8, 0x01), /* Application */ - HID_RI_USAGE(8, 0x01), /* Pointer */ - HID_RI_COLLECTION(8, 0x00), /* Physical */ - HID_RI_USAGE_PAGE(8, 0x09), /* Button */ - HID_RI_USAGE_MINIMUM(8, 0x01), - HID_RI_USAGE_MAXIMUM(8, 0x03), - HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(8, 0x01), - HID_RI_REPORT_COUNT(8, 0x03), - HID_RI_REPORT_SIZE(8, 0x01), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_VOLATILE), - HID_RI_REPORT_COUNT(8, 0x01), - HID_RI_REPORT_SIZE(8, 0x05), - HID_RI_INPUT(8, HID_IOF_CONSTANT), - HID_RI_USAGE_PAGE(8, 0x01), /* Generic Desktop */ - HID_RI_USAGE(8, 0x30), /* Usage X */ - HID_RI_USAGE(8, 0x31), /* Usage Y */ - HID_RI_LOGICAL_MINIMUM(8, -1), - HID_RI_LOGICAL_MAXIMUM(8, 1), - HID_RI_PHYSICAL_MINIMUM(8, -1), - HID_RI_PHYSICAL_MAXIMUM(8, 1), - HID_RI_REPORT_COUNT(8, 0x02), - HID_RI_REPORT_SIZE(8, 0x08), - HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE | HID_IOF_NON_VOLATILE), - HID_RI_END_COLLECTION(0), - HID_RI_END_COLLECTION(0), + /* Use the HID class driver's standard Mouse report. + * Min X/Y Axis values: -1 + * Max X/Y Axis values: 1 + * Min physical X/Y Axis values (used to determine resolution): -1 + * Max physical X/Y Axis values (used to determine resolution): 1 + * Buttons: 3 + * Absolute screen coordinates: false + */ + HID_DESCRIPTOR_MOUSE(-1, 1, -1, 1, 3, false) }; /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall |