File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,29 @@ void USBEndpointTester::callback_request(const setup_packet_t *setup)
228
228
result = PassThrough;
229
229
break ;
230
230
}
231
+ } else if ((setup->bmRequestType .Type == STANDARD_TYPE) && (setup->bmRequestType .Recipient == ENDPOINT_RECIPIENT)) {
232
+ if (setup->bRequest == CLEAR_FEATURE) {
233
+ usb_ep_t ep = setup->wIndex ;
234
+ bool valid = false ;
235
+ uint32_t ep_index = 0 ;
236
+ if (ep == _endpoints[EP_BULK_OUT]) {
237
+ valid = true ;
238
+ ep_index = EP_BULK_OUT;
239
+ } else if (ep == _endpoints[EP_INT_OUT]) {
240
+ valid = true ;
241
+ ep_index = EP_INT_OUT;
242
+ } else if (ep == _endpoints[EP_ISO_OUT]) {
243
+ valid = true ;
244
+ ep_index = EP_ISO_OUT;
245
+ }
246
+
247
+ if (valid) {
248
+ // Restart reads when an OUT endpoint is unstalled
249
+ result = Success;
250
+ endpoint_unstall (ep);
251
+ read_start (_endpoints[ep_index], _endpoint_buffs[ep_index], (*_endpoint_configs)[ep_index].max_packet );
252
+ }
253
+ }
231
254
}
232
255
complete_request (result, data, size);
233
256
}
You can’t perform that action at this time.
0 commit comments