File tree 1 file changed +4
-6
lines changed
src/portable/synopsys/dwc2
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1136,16 +1136,14 @@ void dcd_int_handler(uint8_t rhport) {
1136
1136
1137
1137
if (int_status & GINTSTS_SOF ) {
1138
1138
dwc2 -> gintsts = GINTSTS_SOF ;
1139
+ const uint32_t frame = (dwc2 -> dsts & DSTS_FNSOF ) >> DSTS_FNSOF_Pos ;
1139
1140
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 ) {
1145
1143
dwc2 -> gintmsk &= ~GINTMSK_SOFM ;
1146
1144
}
1147
1145
1148
- dcd_event_bus_signal (rhport , DCD_EVENT_SOF , true);
1146
+ dcd_event_sof (rhport , frame , true);
1149
1147
}
1150
1148
1151
1149
// RxFIFO non-empty interrupt handling.
You can’t perform that action at this time.
0 commit comments