Ver Fonte

overwrite grstctl on edpt_disable

Pascal Speck há 3 anos atrás
pai
commit
f452ab745e
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/portable/synopsys/dwc2/dcd_dwc2.c

+ 1 - 1
src/portable/synopsys/dwc2/dcd_dwc2.c

@@ -796,7 +796,7 @@ static void dcd_edpt_disable (uint8_t rhport, uint8_t ep_addr, bool stall)
     }
 
     // Flush the FIFO, and wait until we have confirmed it cleared.
-    dwc2->grstctl |= (epnum << GRSTCTL_TXFNUM_Pos);
+    dwc2->grstctl = (epnum << GRSTCTL_TXFNUM_Pos);
     dwc2->grstctl |= GRSTCTL_TXFFLSH;
     while ( (dwc2->grstctl & GRSTCTL_TXFFLSH_Msk) != 0 ) {}
   }