Fix spurious EP0 completion.

This commit is contained in:
HiFiPhile
2024-05-05 22:01:09 +02:00
parent 8765568282
commit 02ec486610

View File

@@ -1080,6 +1080,9 @@ static void handle_epout_irq(uint8_t rhport) {
}
} else if (doepint & DOEPINT_OTEPSPR) {
epout->doepint = DOEPINT_OTEPSPR;
} else {
if ((doepint & DOEPINT_STPKTRX) && (dwc2->gsnpsid >= DWC2_CORE_REV_3_00a)) {
epout->doepint = DOEPINT_STPKTRX;
} else {
// EP0 can only handle one packet
if ((n == 0) && ep0_pending[TUSB_DIR_OUT]) {
@@ -1100,6 +1103,7 @@ static void handle_epout_irq(uint8_t rhport) {
}
}
}
}
// SETUP packet Setup Phase done.
if (doepint & DOEPINT_STUP) {