diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-01-30 14:40:24 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-01-30 14:40:24 +0000 |
| commit | ea9c2018d7920a35f318b57d138b722c53765421 (patch) | |
| tree | 905d172f844a21f8fcc0ef301cc2f416b1fce286 /Demos | |
| parent | 1d49169279031f951008acc872cc1241b8e03f32 (diff) | |
Oops - forgot to add in LOGICAL MINIMUM and LOGICAL MAXIMUM report items into the standard library Joystick HID report descriptor macro. Add in support for joystick resolution reporting via PHYSICAL_MINIMUM and PHYSICAL_MAXIMUM items.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1645 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos')
| -rw-r--r-- | Demos/Device/ClassDriver/GenericHID/Descriptors.c | 2 | ||||
| -rw-r--r-- | Demos/Device/ClassDriver/Joystick/Descriptors.c | 4 | ||||
| -rw-r--r-- | Demos/Device/LowLevel/Joystick/Descriptors.c | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/Demos/Device/ClassDriver/GenericHID/Descriptors.c b/Demos/Device/ClassDriver/GenericHID/Descriptors.c index 6928baa6..761e904e 100644 --- a/Demos/Device/ClassDriver/GenericHID/Descriptors.c +++ b/Demos/Device/ClassDriver/GenericHID/Descriptors.c @@ -45,7 +45,7 @@ */ USB_Descriptor_HIDReport_Datatype_t PROGMEM GenericReport[] = { - /* Use the HID class driver's standard Joystick report. + /* Use the HID class driver's standard Vendor HID report. * Vendor Usage Page: 1 * Vendor Collection Usage: 1 * Vendor Report IN Usage: 2 diff --git a/Demos/Device/ClassDriver/Joystick/Descriptors.c b/Demos/Device/ClassDriver/Joystick/Descriptors.c index 75605e15..5adac0ff 100644 --- a/Demos/Device/ClassDriver/Joystick/Descriptors.c +++ b/Demos/Device/ClassDriver/Joystick/Descriptors.c @@ -48,9 +48,11 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM JoystickReport[] = /* Use the HID class driver's standard Joystick report. * Min X/Y Axis values: -100 * Max X/Y Axis values: 100 + * Min physical X/Y Axis values (used to determine resolution): -1 + * Max physical X/Y Axis values (used to determine resolution): 1 * Buttons: 2 */ - HID_DESCRIPTOR_JOYSTICK(-100, 100, 2) + HID_DESCRIPTOR_JOYSTICK(-100, 100, -1, 1, 2) }; /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall diff --git a/Demos/Device/LowLevel/Joystick/Descriptors.c b/Demos/Device/LowLevel/Joystick/Descriptors.c index 4cfdddd2..5db6b0d2 100644 --- a/Demos/Device/LowLevel/Joystick/Descriptors.c +++ b/Demos/Device/LowLevel/Joystick/Descriptors.c @@ -54,8 +54,10 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM JoystickReport[] = HID_RI_USAGE(8, 0x31), /* Usage Y */ HID_RI_LOGICAL_MINIMUM(8, -100), HID_RI_LOGICAL_MAXIMUM(8, 100), - HID_RI_REPORT_SIZE(8, 0x08), + 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_ABSOLUTE), HID_RI_END_COLLECTION(0), HID_RI_USAGE_PAGE(8, 0x09), /* Button */ |
