Skip to content

Commit e1c3b5a

Browse files
committed
minor update to sof
1 parent 50738f2 commit e1c3b5a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/portable/synopsys/dwc2/dcd_dwc2.c

+4-6
Original file line numberDiff line numberDiff line change
@@ -1136,16 +1136,14 @@ void dcd_int_handler(uint8_t rhport) {
11361136

11371137
if(int_status & GINTSTS_SOF) {
11381138
dwc2->gintsts = GINTSTS_SOF;
1139+
const uint32_t frame = (dwc2->dsts & DSTS_FNSOF) >> DSTS_FNSOF_Pos;
11391140

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

1148-
dcd_event_bus_signal(rhport, DCD_EVENT_SOF, true);
1146+
dcd_event_sof(rhport, frame, true);
11491147
}
11501148

11511149
// RxFIFO non-empty interrupt handling.

0 commit comments

Comments
 (0)