diff options
| author | Ha Thach <[email protected]> | 2020-07-10 12:29:06 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-07-10 12:29:06 +0700 |
| commit | 81392da1ea6860eec5af0bcd11a7350986abd5d9 (patch) | |
| tree | 5cec4784f2cd817c88890179927b33695321b610 /src | |
| parent | dbced9911d67fb2063b6eff9e51d463b9062687a (diff) | |
| parent | d493724a7bd0f4dca718f478aec301d299bd5416 (diff) | |
Merge pull request #456 from me-no-dev/esp32-s2-epin-to
ESP32-S2: Detect EP IN Xfer Timeout
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/espressif/esp32s2/dcd_esp32s2.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/portable/espressif/esp32s2/dcd_esp32s2.c b/src/portable/espressif/esp32s2/dcd_esp32s2.c index d49b69a10..3d30b6016 100644 --- a/src/portable/espressif/esp32s2/dcd_esp32s2.c +++ b/src/portable/espressif/esp32s2/dcd_esp32s2.c @@ -637,6 +637,13 @@ static void handle_epin_ints(void) USB0.dtknqr4_fifoemptymsk &= ~(1 << n); } } + + // XFER Timeout + if (USB0.in_ep_reg[n].diepint & USB_D_TIMEOUT0_M) { + // Clear interrupt or enpoint will hang. + USB0.in_ep_reg[n].diepint = USB_D_TIMEOUT0_M; + // Maybe retry? + } } } } |
