CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

USB HID Descriptor for two IN endpoints

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
SuperDave



Joined: 22 May 2008
Posts: 63
Location: Madison, TN

View user's profile Send private message Visit poster's website

USB HID Descriptor for two IN endpoints
PostPosted: Mon Nov 03, 2014 5:37 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group