diff options
| author | Ha Thach <[email protected]> | 2022-06-01 14:36:36 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-06-01 14:36:36 +0700 |
| commit | fd8afc7e3b5539b86dbeb3ac51bb88bb93d4923a (patch) | |
| tree | 887aef151942fe026c40719121a95f2c56c52dde /src | |
| parent | 9352f7522033c31a91f328cdce35a57cf6c95fec (diff) | |
| parent | 6e7cd220dc60b176e0096f4a5818376ea84a7e15 (diff) | |
Merge pull request #1454 from Iktek/bugfix_1453
overwrite grstctl on edpt_disable
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/synopsys/dwc2/dcd_dwc2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c index ccc16d643..e489f6445 100644 --- a/src/portable/synopsys/dwc2/dcd_dwc2.c +++ b/src/portable/synopsys/dwc2/dcd_dwc2.c @@ -819,8 +819,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 |= GRSTCTL_TXFFLSH; + dwc2->grstctl = ((epnum << GRSTCTL_TXFNUM_Pos) | GRSTCTL_TXFFLSH); while ( (dwc2->grstctl & GRSTCTL_TXFFLSH_Msk) != 0 ) {} } else |
