PORTS Forum

Ports and Interfaces => USB => Topic started by: ChicagoMike on November 11, 2010, 06:15:01 pm

Title: Class descriptor question
Post by: ChicagoMike on November 11, 2010, 06:15:01 pm
Hello,

I'm having a bit of a problem wrapping my head around the following: The class descriptors for HID and DFU device classes are both of type 0x21. If a USB device exposes both DFU and HID interfaces, and subsequently receives from its host a GET_DESCRIPTOR request with wValue set to 0x2100, how is the device to know whether to send its HID descriptor or its DFU descriptor?

Thanks for your help,

Mike
Title: Re: Class descriptor question
Post by: JohnHyde on November 11, 2010, 07:21:10 pm
With a CLASS Get_Descriptor Request wIndexLow = Interface Number.  Your Composite Device (HID + DFU) will define 2 interfaces, 0 and 1, within the Configuration Descriptor.  So check wIndexLow and return the correct one.

Regards,  John
Title: Re: Class descriptor question
Post by: ChicagoMike on November 11, 2010, 10:48:15 pm
Awesome!

Thanks so much for your help.

Mike