Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/portable/synopsys/dwc2/dcd_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1142,21 +1142,6 @@ static void handle_epout_irq (uint8_t rhport)

uint32_t const doepint = epout->doepint;

// SETUP packet Setup Phase done.
if ( doepint & DOEPINT_STUP )
{
uint32_t clear_flag = DOEPINT_STUP;

// STPKTRX is only available for version from 3_00a
if ((doepint & DOEPINT_STPKTRX) && (dwc2->gsnpsid >= DWC2_CORE_REV_3_00a))
{
clear_flag |= DOEPINT_STPKTRX;
}

epout->doepint = clear_flag;
dcd_event_setup_received(rhport, (uint8_t*) _setup_packet, true);
}

// OUT XFER complete
if ( epout->doepint & DOEPINT_XFRC )
{
Expand All @@ -1176,6 +1161,21 @@ static void handle_epout_irq (uint8_t rhport)
}
}

// SETUP packet Setup Phase done.
if ( doepint & DOEPINT_STUP )
{
uint32_t clear_flag = DOEPINT_STUP;

// STPKTRX is only available for version from 3_00a
if ((doepint & DOEPINT_STPKTRX) && (dwc2->gsnpsid >= DWC2_CORE_REV_3_00a))
{
clear_flag |= DOEPINT_STPKTRX;
}

epout->doepint = clear_flag;
dcd_event_setup_received(rhport, (uint8_t*) _setup_packet, true);
}

// Failsafe, clear all pending interrupts if set
epout[n].doepint = epout[n].doepint;
}
Expand Down
Loading