summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2024-07-19 21:10:31 +0700
committerGitHub <[email protected]>2024-07-19 21:10:31 +0700
commitdcf133b6ae73859d450991e577dde9530326c71b (patch)
treee4993786535afd273bbe76455788be82bc4b0679 /src
parentc48d2eba0d1cda4e9fadfe58d621ad300dfd6786 (diff)
parent5e58ec127ff30ce48a9fcb819acfc05edc92f332 (diff)
Merge pull request #2681
usbh: Add set address recovery time
Diffstat (limited to 'src')
-rw-r--r--src/host/usbh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index a94c22c4c..8c488aaa2 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -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);