Skip to content

Commit

Permalink
[component/usb/webusb_hcd] add clear_halt
Browse files Browse the repository at this point in the history
  • Loading branch information
versaloon committed Aug 4, 2023
1 parent 4d4fb86 commit b2a214e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/component/usb/driver/hcd/webusb_hcd/vsf_webusb_hcd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ static int __vk_webusb_hcd_submit_urb_do(vk_usbh_hcd_urb_t *urb)
} else if ( ((USB_RECIP_INTERFACE | USB_DIR_OUT) == setup->bRequestType)
&& (USB_REQ_SET_INTERFACE == setup->bRequest)) {
return vsf_webusb_set_interface_alt_setting(webusb_dev, setup->wIndex, setup->wValue);
} else if ( ((USB_RECIP_ENDPOINT | USB_DIR_OUT) == setup->bRequestType)
&& (USB_REQ_CLEAR_FEATURE == setup->bRequest)
&& (USB_ENDPOINT_HALT == setup->wValue)) {
return vsf_webusb_clear_halt(webusb_dev, setup->wValue);
} else {
return vsf_webusb_control_transfer(webusb_dev, setup->bRequestType,
setup->bRequest, setup->wValue, setup->wIndex, (unsigned char *)urb->buffer,
Expand Down

0 comments on commit b2a214e

Please sign in to comment.