|
34 | 34 | help='HID devices to include in HID report descriptor')
|
35 | 35 | parser.add_argument('--msc_num_endpoint_pairs', type=int, default=1,
|
36 | 36 | help='Use 1 or 2 endpoint pairs for MSC (1 bidirectional, or 1 input + 1 output (required by SAMD21))')
|
| 37 | +parser.add_argument('--msc_max_packet_size', type=int, default=64, |
| 38 | + help='Max packet size for MSC') |
37 | 39 | parser.add_argument('--output_c_file', type=argparse.FileType('w'), required=True)
|
38 | 40 | parser.add_argument('--output_h_file', type=argparse.FileType('w'), required=True)
|
39 | 41 |
|
@@ -155,14 +157,16 @@ def strings_in_order(cls):
|
155 | 157 | description="MSC in",
|
156 | 158 | bEndpointAddress=0x0 | standard.EndpointDescriptor.DIRECTION_IN,
|
157 | 159 | bmAttributes=standard.EndpointDescriptor.TYPE_BULK,
|
158 |
| - bInterval=0), |
| 160 | + bInterval=0, |
| 161 | + wMaxPacketSize=args.msc_max_packet_size), |
159 | 162 | standard.EndpointDescriptor(
|
160 | 163 | description="MSC out",
|
161 | 164 | # SAMD21 needs to use a separate pair of endpoints for MSC.
|
162 | 165 | bEndpointAddress=((0x1 if args.msc_num_endpoint_pairs == 2 else 0x0) |
|
163 | 166 | standard.EndpointDescriptor.DIRECTION_OUT),
|
164 | 167 | bmAttributes=standard.EndpointDescriptor.TYPE_BULK,
|
165 |
| - bInterval=0) |
| 168 | + bInterval=0, |
| 169 | + wMaxPacketSize=args.msc_max_packet_size) |
166 | 170 | ]
|
167 | 171 | )
|
168 | 172 | ]
|
|
0 commit comments