|
44 | 44 | help='endpoint number of MSC OUT') |
45 | 45 | parser.add_argument('--msc_ep_num_in', type=int, default=0, |
46 | 46 | help='endpoint number of MSC IN') |
| 47 | +parser.add_argument('--hid_ep_num_out', type=int, default=0, |
| 48 | + help='endpoint number of HID OUT') |
47 | 49 | parser.add_argument('--hid_ep_num_in', type=int, default=0, |
48 | 50 | help='endpoint number of HID IN') |
49 | 51 | parser.add_argument('--midi_ep_num_out', type=int, default=0, |
|
74 | 76 | raise ValueError("Endpoint address must not be 0") |
75 | 77 |
|
76 | 78 | if 'HID' in args.devices: |
77 | | - if args.hid_ep_num_in == 0: |
| 79 | + if args.args.hid_ep_num_out == 0 or args.hid_ep_num_in == 0: |
78 | 80 | raise ValueError("Endpoint address must not be 0") |
79 | 81 |
|
80 | 82 | if 'AUDIO' in args.devices: |
@@ -231,7 +233,7 @@ def strings_in_order(cls): |
231 | 233 |
|
232 | 234 | hid_endpoint_out_descriptor = standard.EndpointDescriptor( |
233 | 235 | description="HID out", |
234 | | - bEndpointAddress=0x0 | standard.EndpointDescriptor.DIRECTION_OUT, |
| 236 | + bEndpointAddress=args.hid_ep_num_out | standard.EndpointDescriptor.DIRECTION_OUT, |
235 | 237 | bmAttributes=standard.EndpointDescriptor.TYPE_INTERRUPT, |
236 | 238 | bInterval=8) |
237 | 239 |
|
|
0 commit comments