@@ -148,9 +148,6 @@ void USBTester::callback_set_configuration(uint8_t configuration)
148
148
endpoint_add (bulk_in, MAX_EP_SIZE, USB_EP_TYPE_BULK);
149
149
endpoint_add (bulk_out, MAX_EP_SIZE, USB_EP_TYPE_BULK, &USBTester::epbulk_out_callback);
150
150
151
- read_start (int_out);
152
- read_start (bulk_out);
153
-
154
151
complete_set_configuration (true );
155
152
}
156
153
@@ -167,9 +164,6 @@ void USBTester::callback_set_interface(uint16_t interface, uint8_t alternate)
167
164
endpoint_add (bulk_in, MAX_EP_SIZE, USB_EP_TYPE_BULK);
168
165
endpoint_add (bulk_out, MAX_EP_SIZE, USB_EP_TYPE_BULK, &USBTester::epbulk_out_callback);
169
166
170
- read_start (int_out);
171
- read_start (bulk_out);
172
-
173
167
complete_set_interface (true );
174
168
return ;
175
169
}
@@ -184,9 +178,6 @@ void USBTester::callback_set_interface(uint16_t interface, uint8_t alternate)
184
178
endpoint_add (bulk_in, MIN_EP_SIZE, USB_EP_TYPE_BULK);
185
179
endpoint_add (bulk_out, MIN_EP_SIZE, USB_EP_TYPE_BULK, &USBTester::epbulk_out_callback);
186
180
187
- read_start (int_out);
188
- read_start (bulk_out);
189
-
190
181
complete_set_interface (true );
191
182
return ;
192
183
}
@@ -362,10 +353,7 @@ void USBTester::epint_out_callback(usb_ep_t endpoint)
362
353
uint8_t buffer[65 ];
363
354
uint32_t size = 0 ;
364
355
365
- if (!read_finish (endpoint, buffer, sizeof (buffer), &size)) {
366
- return ;
367
- }
368
- if (!read_start (endpoint)) {
356
+ if (!read (endpoint, buffer, sizeof (buffer), &size)) {
369
357
return ;
370
358
}
371
359
}
@@ -374,10 +362,7 @@ void USBTester::epbulk_out_callback(usb_ep_t endpoint)
374
362
uint8_t buffer[65 ];
375
363
uint32_t size = 0 ;
376
364
377
- if (!read_finish (endpoint, buffer, sizeof (buffer), &size)) {
378
- return ;
379
- }
380
- if (!read_start (endpoint)) {
365
+ if (!read (endpoint, buffer, sizeof (buffer), &size)) {
381
366
return ;
382
367
}
383
368
}
0 commit comments