mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-19 19:21:05 +00:00
grstctl set fifo + flush in one assign
This commit is contained in:
parent
f452ab745e
commit
6e7cd220dc
@ -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.
|
// Flush the FIFO, and wait until we have confirmed it cleared.
|
||||||
dwc2->grstctl = (epnum << GRSTCTL_TXFNUM_Pos);
|
dwc2->grstctl = ((epnum << GRSTCTL_TXFNUM_Pos) | GRSTCTL_TXFFLSH);
|
||||||
dwc2->grstctl |= GRSTCTL_TXFFLSH;
|
|
||||||
while ( (dwc2->grstctl & GRSTCTL_TXFFLSH_Msk) != 0 ) {}
|
while ( (dwc2->grstctl & GRSTCTL_TXFFLSH_Msk) != 0 ) {}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user