summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-09-08 17:15:28 +0200
committerGitHub <[email protected]>2024-09-08 17:15:28 +0200
commit7867464694a5889f5974385e962f40c9a064c7b2 (patch)
tree39e469aad8c7daa89c62e6a55a70dd1c0f32c8bb /src/host
parent6d4e2f6c16e239889195fcfbd81b4d27b6ff1979 (diff)
parent3eea46056ea20aa12b73eea7c01d6c6e5b2d490a (diff)
Merge branch 'master' into dwc2_dma
Diffstat (limited to 'src/host')
-rw-r--r--src/host/usbh.c3
-rw-r--r--src/host/usbh.h2
2 files changed, 4 insertions, 1 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);
diff --git a/src/host/usbh.h b/src/host/usbh.h
index 359684169..d0a5732e5 100644
--- a/src/host/usbh.h
+++ b/src/host/usbh.h
@@ -81,7 +81,7 @@ enum {
};
typedef struct {
- uint8_t max_nak; // max NAK per endpoint per frame
+ uint8_t max_nak; // max NAK per endpoint per frame to save CPU/SPI bus usage
uint8_t cpuctl; // R16: CPU Control Register
uint8_t pinctl; // R17: Pin Control Register. FDUPSPI bit is ignored
} tuh_configure_max3421_t;