Page 1 of 1

HID Report Descriptor

Posted: Mon Dec 03, 2007 6:01 am
by Rukus
I was wondering if someone might show a input and output in a HID Report Descriptor.

I'm able to create a hid report using X, Y, Z as inputs for the report....but I was wondering if someone could show a Report Descriptor that has both 16bit value inputs as well as 16bit value outputs.

I just cant seem to figure this out, and I've spent alot of time searching on the internet to no avail. I have everything working except this.


Also to implement a interupt out will I have to add my own endpoint descriptor to usbdrv.c? I notice that Christian adds a interupt in endpoint descriptor to the Configuration Descriptor automaticly if USB_CFG_HAVE_INTRIN_ENDPOINT is defined. I don't see a define for example USB_CFG_HAVE_INTROUT_ENDPOINT.

Update: I've been able to get the HID report created so that part is fixed.

Posted: Tue Dec 04, 2007 10:08 am
by christian
If you want more than the most basic configuration descriptor, please put the entire descriptor into your own C module and add

#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_LENGTH(xxx)

to your usbconfig.h where xxx stands for the length of the descriptor in bytes. Alternatively you can add

#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC

in usbconfig.h and implement usbFunctionDescriptor() in your own code. See AVR-Doper for an example.

Please don't modify the driver code itself since that makes it harder to upgrade to new versions. If you think you NEED TO modify the driver, please get in contact with us.