diff options
| author | hathach <[email protected]> | 2022-06-01 13:18:24 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-06-01 13:18:24 +0700 |
| commit | 6e7cd220dc60b176e0096f4a5818376ea84a7e15 (patch) | |
| tree | 1918d2bc5384030beae64625d406bc4d0603b103 /src | |
| parent | f452ab745ef953d74704bc5429ff16a80a5b325a (diff) | |
grstctl set fifo + flush in one assign
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 01b74d05e..556bcaf65 100644 --- a/src/portable/synopsys/dwc2/dcd_dwc2.c +++ b/src/portable/synopsys/dwc2/dcd_dwc2.c @@ -796,8 +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 |= GRSTCTL_TXFFLSH; + dwc2->grstctl = ((epnum << GRSTCTL_TXFNUM_Pos) | GRSTCTL_TXFFLSH); while ( (dwc2->grstctl & GRSTCTL_TXFFLSH_Msk) != 0 ) {} } else |
