@@ -169,7 +169,7 @@ def strings_in_order(cls):
169169# This will renumber the endpoints to make them unique across descriptors,
170170# and renumber the interfaces in order. But we still need to fix up certain
171171# interface cross-references.
172- interfaces = util .join_interfaces (hid_interfaces , msc_interfaces , cdc_interfaces )
172+ interfaces = util .join_interfaces (cdc_interfaces , msc_interfaces , hid_interfaces )
173173
174174# Now adjust the CDC interface cross-references.
175175
@@ -196,14 +196,16 @@ def strings_in_order(cls):
196196descriptor_list = []
197197descriptor_list .append (device )
198198descriptor_list .append (configuration )
199- descriptor_list .extend (hid_interfaces )
199+ descriptor_list .append (cdc_iad )
200+ descriptor_list .extend (cdc_interfaces )
200201descriptor_list .extend (msc_interfaces )
201202# Put the CDC IAD just before the CDC interfaces.
202203# There appears to be a bug in the Windows composite USB driver that requests the
203204# HID report descriptor with the wrong interface number if the HID interface is not given
204- # first. However, it still fetches the descriptor anyway.
205- descriptor_list .append (cdc_iad )
206- descriptor_list .extend (cdc_interfaces )
205+ # first. However, it still fetches the descriptor anyway. We could reorder the interfaces but
206+ # the Windows 7 Adafruit_usbser.inf file thinks CDC is at Interface 0, so we'll leave it
207+ # there for backwards compatibility.
208+ descriptor_list .extend (hid_interfaces )
207209
208210string_descriptors = [standard .StringDescriptor (string ) for string in StringIndex .strings_in_order ()]
209211serial_number_descriptor = string_descriptors [SERIAL_NUMBER_INDEX ]
0 commit comments