From b2a214e54aee0e0e3e5f2c3830f2b2a2f6081075 Mon Sep 17 00:00:00 2001 From: vsfos Date: Fri, 4 Aug 2023 19:55:09 +0800 Subject: [PATCH] [component/usb/webusb_hcd] add clear_halt --- source/component/usb/driver/hcd/webusb_hcd/vsf_webusb_hcd.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/component/usb/driver/hcd/webusb_hcd/vsf_webusb_hcd.cc b/source/component/usb/driver/hcd/webusb_hcd/vsf_webusb_hcd.cc index 190b66014..102d4d2f3 100644 --- a/source/component/usb/driver/hcd/webusb_hcd/vsf_webusb_hcd.cc +++ b/source/component/usb/driver/hcd/webusb_hcd/vsf_webusb_hcd.cc @@ -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,