Author Topic: Class descriptor question  (Read 14382 times)

ChicagoMike

  • Member
  • ***
  • Posts: 6
Class descriptor question
« 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

JohnHyde

  • Member
  • ***
  • Posts: 4
Re: Class descriptor question
« Reply #1 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

ChicagoMike

  • Member
  • ***
  • Posts: 6
Re: Class descriptor question
« Reply #2 on: November 11, 2010, 10:48:15 pm »
Awesome!

Thanks so much for your help.

Mike