summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorRyzee119 <[email protected]>2024-06-20 09:33:01 +0930
committerGitHub <[email protected]>2024-06-20 09:33:01 +0930
commit5e58ec127ff30ce48a9fcb819acfc05edc92f332 (patch)
treefe897c7a20bb0a5e05bd2191f0a6c6215be112a7 /src/host
parent1cc319a15d3e763c2dd97d15d39c99fb073d77a5 (diff)
usbh: Add set address recovery time
Ref USB Spec 9.2.6.3
Diffstat (limited to 'src/host')
-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);