diff options
| author | sakumisu <[email protected]> | 2023-11-27 20:29:24 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2023-11-27 20:29:24 +0800 |
| commit | b14976dd5624a3697d69024d1230199d3a91dbb4 (patch) | |
| tree | 9f227d2ed8d659746ca372842c9f8b57ed49904d | |
| parent | 9cd88c0ca315f1956ea2c808ebf1284cd6162c87 (diff) | |
fix usbh_set_interface api, correct wValue for altsetting
| -rw-r--r-- | core/usbh_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/usbh_core.c b/core/usbh_core.c index 91d79f71..6ef33ccb 100644 --- a/core/usbh_core.c +++ b/core/usbh_core.c @@ -392,8 +392,8 @@ int usbh_set_interface(struct usbh_hubport *hport, uint8_t intf, uint8_t altsett setup->bmRequestType = USB_REQUEST_DIR_OUT | USB_REQUEST_STANDARD | USB_REQUEST_RECIPIENT_INTERFACE; setup->bRequest = USB_REQUEST_SET_INTERFACE; - setup->wValue = intf; - setup->wIndex = altsetting; + setup->wValue = altsetting; + setup->wIndex = intf; setup->wLength = 0; return usbh_control_transfer(hport, setup, NULL); |
