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

A useful USB descriptor

 
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

A useful USB descriptor
PostPosted: Thu Oct 23, 2014 1:25 pm     Reply with quote

Virtually all the USB descriptor examples either assume a mouse (Is anybody here developing a mouse?) or require a separate driver be modified/installed. Which is to say they aren't terribly useful.

Does anyone know of a simple data transmission example that
1. Uses USB HID (thus no extra driver needed)
2. Uses bulk or interrupt transfer.
3. Supports two IN endpoints of at least 60 bytes each.
4. Just puts the data in the host endpoints as two arrays of bytes. (i.e. no or very simple report descriptor)

Thanks
Ttelmah



Joined: 11 Mar 2010
Posts: 19515

View user's profile Send private message

PostPosted: Fri Oct 24, 2014 12:21 am     Reply with quote

Line 1, is false.....

HID does _not_ imply that no further driver is needed. This is only true for devices is certain standard classes, such as 'keyboard', and 'mouse'.....

However you can just do this as a generic HID, and use report. 64bytes max in one transfer (HID interrupt endpoint limit).
SuperDave



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

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

PostPosted: Fri Oct 24, 2014 9:11 am     Reply with quote

Perhaps the line should have been more elegantly stated as uses HID in a way that no custom operating system driver is required. I use Delphi 2010 and a TJvHidDeviceController which appears to give me easy access to data in defined endpoints.

So using usb_desc_mouse.h as a template and ignoring the trivial vid, pid, strings, config length changes it looks like I can

1. Duplicate the EP1_TX info to EP2_TX (line 54)

2. Change the interface descriptor (line 160)
a. number of endpoints to 2 (line 165)
b. subclass to 0 (line 167)
c. protocol to 0 (line 168)

3. Duplicate the endpoint descriptor for the added endpoint2. (line 180)

But, what do I do with the

1. Class descriptor (line 171)

2. Report descriptor (line 60)

I can find nothing that clarifies those items or if they are even necessary. I'm assuming here that one interface can have two essentially identical endpoints. I suppose it's equally possible or equally impossible to have two interfaces with one endpoint each.

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