summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-08-14 06:33:42 +0700
committerhathach <[email protected]>2024-08-14 06:33:42 +0700
commit761399b5e09fd682d7be5ad7570c039922eb18bb (patch)
tree6f06f5d974fbbd74cdd83f328ca4e94175a38e80 /src/host
parent5122d6d109f8c4b31b6cbe29c685fad30a8961fe (diff)
parentb8d3c0c4a8e005bcfcc4ed04556e6da54f235ccc (diff)
Merge branch 'refs/heads/master' into fork/BrentK-ADI/max32_port
Diffstat (limited to 'src/host')
-rw-r--r--src/host/usbh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index 7a47f5056..8c488aaa2 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -1113,7 +1113,7 @@ bool tuh_interface_set(uint8_t daddr, uint8_t itf_num, uint8_t itf_alt,
TU_LOG_USBH("Set Interface %u Alternate %u\r\n", itf_num, itf_alt);
tusb_control_request_t const request = {
.bmRequestType_bit = {
- .recipient = TUSB_REQ_RCPT_DEVICE,
+ .recipient = TUSB_REQ_RCPT_INTERFACE,
.type = TUSB_REQ_TYPE_STANDARD,
.direction = TUSB_DIR_OUT
},
@@ -1421,6 +1421,9 @@ static void process_enumeration(tuh_xfer_t* xfer) {
break;
case ENUM_GET_DEVICE_DESC: {
+ // Allow 2ms for address recovery time, Ref USB Spec 9.2.6.3
+ osal_task_delay(2);
+
uint8_t const new_addr = (uint8_t) tu_le16toh(xfer->setup->wValue);
usbh_device_t* new_dev = get_device(new_addr);