|
21 | 21 | help='length needed for the serial number in digits') |
22 | 22 | parser.add_argument('--output_c_file', type=argparse.FileType('w'), required=True) |
23 | 23 | parser.add_argument('--output_h_file', type=argparse.FileType('w'), required=True) |
24 | | -parser.add_argument('--cdc_and_msc_only', nargs='?',const=0, type=int) |
25 | 24 |
|
26 | 25 | args = parser.parse_args() |
27 | 26 |
|
@@ -132,7 +131,7 @@ def strings_in_order(cls): |
132 | 131 | bInterval=0), |
133 | 132 | standard.EndpointDescriptor( |
134 | 133 | description="MSC out", |
135 | | - bEndpointAddress=0x0 | standard.EndpointDescriptor.DIRECTION_OUT, |
| 134 | + bEndpointAddress=0x1 | standard.EndpointDescriptor.DIRECTION_OUT, |
136 | 135 | bmAttributes=standard.EndpointDescriptor.TYPE_BULK, |
137 | 136 | bInterval=0) |
138 | 137 | ] |
@@ -277,16 +276,14 @@ def strings_in_order(cls): |
277 | 276 | descriptor_list.extend(msc_interfaces) |
278 | 277 | # Only add the control interface because other audio interfaces are managed by it to ensure the |
279 | 278 | # correct ordering. |
280 | | -if not args.cdc_and_msc_only: |
281 | | - descriptor_list.append(audio_control_interface) |
| 279 | +descriptor_list.append(audio_control_interface) |
282 | 280 | # Put the CDC IAD just before the CDC interfaces. |
283 | 281 | # There appears to be a bug in the Windows composite USB driver that requests the |
284 | 282 | # HID report descriptor with the wrong interface number if the HID interface is not given |
285 | 283 | # first. However, it still fetches the descriptor anyway. We could reorder the interfaces but |
286 | 284 | # the Windows 7 Adafruit_usbser.inf file thinks CDC is at Interface 0, so we'll leave it |
287 | 285 | # there for backwards compatibility. |
288 | | -if not args.cdc_and_msc_only: |
289 | | - descriptor_list.extend(hid_interfaces) |
| 286 | +descriptor_list.extend(hid_interfaces) |
290 | 287 |
|
291 | 288 | configuration = standard.ConfigurationDescriptor( |
292 | 289 | description="Composite configuration", |
|
0 commit comments