Skip to content

Commit

Permalink
minor update to sof
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Apr 16, 2024
1 parent 50738f2 commit e1c3b5a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/portable/synopsys/dwc2/dcd_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,16 +1136,14 @@ void dcd_int_handler(uint8_t rhport) {

if(int_status & GINTSTS_SOF) {
dwc2->gintsts = GINTSTS_SOF;
const uint32_t frame = (dwc2->dsts & DSTS_FNSOF) >> DSTS_FNSOF_Pos;

if (_sof_en) {
uint32_t frame = (dwc2->dsts & (DSTS_FNSOF)) >> 8;
dcd_event_sof(rhport, frame, true);
} else {
// Disable SOF interrupt if SOF was not explicitly enabled. SOF was used for remote wakeup detection
// Disable SOF interrupt if SOF was not explicitly enabled since SOF was used for remote wakeup detection
if (!_sof_en) {
dwc2->gintmsk &= ~GINTMSK_SOFM;
}

dcd_event_bus_signal(rhport, DCD_EVENT_SOF, true);
dcd_event_sof(rhport, frame, true);
}

// RxFIFO non-empty interrupt handling.
Expand Down

0 comments on commit e1c3b5a

Please sign in to comment.