diff options
author | Pat Thoyts <patthoyts@users.sourceforge.net> | 2013-04-15 00:41:30 +0100 |
---|---|---|
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | 2014-01-20 10:29:35 +0000 |
commit | 657973c54a080f017124a46649e7934c6419314e (patch) | |
tree | 0ca3ac82f9ed321d66505042c649e91380a558a0 /usbdrv/usbdrv.c | |
parent | 6f64e80f219273967d6ac7096f3ca3d7db5a0e79 (diff) | |
download | v-usb-657973c54a080f017124a46649e7934c6419314e.tar.gz v-usb-657973c54a080f017124a46649e7934c6419314e.tar.bz2 v-usb-657973c54a080f017124a46649e7934c6419314e.zip |
usbdrv: support HID descriptors over 255 bytes
Implementing HID devices conforming to the Windows 8 Sensor API can produce quite large
HID descriptors - well over 255 bytes. This requires USB_CFG_LONG_TRANSFERS to be enabled
and also requires the recent patch to support large descriptors. That patch failed to enable
large HID descriptors but this is fixed by this commit.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'usbdrv/usbdrv.c')
-rw-r--r-- | usbdrv/usbdrv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usbdrv/usbdrv.c b/usbdrv/usbdrv.c index 6c61e3b..c0b3159 100644 --- a/usbdrv/usbdrv.c +++ b/usbdrv/usbdrv.c @@ -169,7 +169,8 @@ PROGMEM const char usbDescriptorConfiguration[] = { /* USB configuration desc 0x00, /* target country code */ 0x01, /* number of HID Report (or other HID class) Descriptor infos to follow */ 0x22, /* descriptor type: report */ - USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH, 0, /* total length of report descriptor */ + (USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH & 0xFF), /* descriptor length (low byte) */ + ((USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH >> 8) & 0xFF), /* (high byte) */ #endif #if USB_CFG_HAVE_INTRIN_ENDPOINT /* endpoint descriptor for endpoint 1 */ 7, /* sizeof(usbDescrEndpoint) */ |