Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
HiFiPhile committed Apr 6, 2024
1 parent 2e8c4d4 commit bf8b60b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/portable/synopsys/dwc2/dcd_dwc2.c
Expand Up @@ -207,7 +207,7 @@ static void dma_ep0_start(uint8_t rhport)
dwc2->epout[0].doeptsiz = (3 << DOEPTSIZ_STUPCNT_Pos);
dwc2->epout[0].doeptsiz |= (3 * 8);
dwc2->epout[0].doeptsiz |= (1 << DOEPTSIZ_PKTCNT_Pos);
dwc2->epout[0].doepdma = (uint32_t)_setup_packet;
dwc2->epout[0].doepdma = (uintptr_t)_setup_packet;

dwc2->epout[0].doepctl |= DOEPCTL_EPENA | DOEPCTL_USBAEP;
}
Expand Down Expand Up @@ -1063,12 +1063,13 @@ static void handle_epout_irq(uint8_t rhport) {
// STPKTRX is only available for version from 3_00a
if ((doepint & DOEPINT_STPKTRX) && (dwc2->gsnpsid >= DWC2_CORE_REV_3_00a)) {
clear_flag |= DOEPINT_STPKTRX;
if(dma_supported(rhport)) {
dma_ep0_start(rhport);
}
}

epout->doepint = clear_flag;

if(dma_supported(rhport) && (dwc2->gsnpsid >= DWC2_CORE_REV_3_00a)) {
dma_ep0_start(rhport);
}

dcd_event_setup_received(rhport, (uint8_t*) _setup_packet, true);
}

Expand Down

0 comments on commit bf8b60b

Please sign in to comment.