diff options
| author | HiFiPhile <[email protected]> | 2025-10-11 16:09:33 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2025-10-11 16:09:33 +0200 |
| commit | 785454a3977d9118bf8d86e54a564689b5065f9b (patch) | |
| tree | 58ee9380da6d625aa065c9473cd5bbbe18d03d9d /src/portable/synopsys/dwc2 | |
| parent | c566db87b32a412f2a2739c4706446e132c26369 (diff) | |
| parent | 2e29d1c60d119b2aa71e36d0c1ac2a383e333076 (diff) | |
Merge branch 'master' into dwc2_ep0
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src/portable/synopsys/dwc2')
| -rw-r--r-- | src/portable/synopsys/dwc2/dcd_dwc2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c index 12290b6a4..638c3e3ab 100644 --- a/src/portable/synopsys/dwc2/dcd_dwc2.c +++ b/src/portable/synopsys/dwc2/dcd_dwc2.c @@ -831,14 +831,14 @@ static void handle_rxflvl_irq(uint8_t rhport) { dfifo_read_packet(dwc2, xfer->buffer, byte_count); xfer->buffer += byte_count; } + } - // short packet, minus remaining bytes (xfer_size) - if (byte_count < xfer->max_size) { - const dwc2_ep_tsize_t tsiz = {.value = epout->tsiz}; - xfer->total_len -= tsiz.xfer_size; - if (epnum == 0) { - _dcd_data.ep0_pending[TUSB_DIR_OUT] = 0; - } + // short packet (including ZLP when byte_count == 0), minus remaining bytes (xfer_size) + if (byte_count < xfer->max_size) { + const dwc2_ep_tsize_t tsiz = {.value = epout->tsiz}; + xfer->total_len -= tsiz.xfer_size; + if (epnum == 0) { + _dcd_data.ep0_pending[TUSB_DIR_OUT] = 0; } } break; |
