summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-07-28 11:59:52 +0200
committerHiFiPhile <[email protected]>2024-07-28 11:59:52 +0200
commitf48a4567a6f97c6f814ad6cd3de544bcce42e585 (patch)
tree2b5e4d18f4d1ac827f97531db6729ecb13583189 /src/host
parentb0f5422262a26fb1ab496e33bb8009efb6660788 (diff)
parentcfbdc44a8d099240ad5ef208bd639487c2f28153 (diff)
Merge branch 'master' of https://github.com/hathach/tinyusb into rx_fb
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);