SuperDave
Joined: 22 May 2008 Posts: 63 Location: Madison, TN
|
USB HID Descriptor for two IN endpoints |
Posted: Mon Nov 03, 2014 5:37 pm |
|
|
This is a restatement of a problem with significantly more detail that I ran into about a week and half ago and still can't find the answer. Very frustrating.
I use Delphi 2010 and a TJvHidDeviceController which appears to give me easy access to data in defined endpoints in the PC. So the question is about the descriptor on the PIC end. PCW 5.18.31.16 IDE
I need two input endpoints of less than 64 bytes each (but more than 64 bytes in total) and I wish to use an HID driver but can't find a direct example. Note that both the host application and the device application know what the bytes mean, they aren't try to emulate a mouse for example, they're just raw data bytes created by the device and interpreted by the host application.
So using usb_desc_mouse.h as a template (I'd repeat the code here but it's copyrighted.) and ignoring the trivial vid, pid, strings, config length changes it looks like I can...
1. Duplicate the EP1_TX info to EP2_TX (lines 51-56) changing TX_size as well.
2. In the USB_CONFIG_DESC[], change the interface descriptor (lines 160-169)
a. number of endpoints to 2 (line 165)
b. subclass to 0 (line 167) removing boot
c. protocol to 0 (line 168)
3. In the USB_CONFIG_DESC[], duplicate the endpoint descriptor for the added endpoint2. (lines 180-187) including changing the endpoint to 0x82
But, what do I do with the
1. Class descriptor (lines 171-178) Looks like I just leave it since I'm keeping the HID class.
2. Report descriptor (lines 60-100) This looks very mouse specific.
I can find nothing that clarifies those items or if they are even necessary when not implementing a mouse.
Thanks for the help |
|