/* Flush FIFO Perform a complete flush of RX and TX  */
static void flush_fifo(usbd_device *dev)
/* Flush FIFO Perform a complete flush of RX and TX  */
static void flush_fifo(usbd_device *dev)
{
	REBASE(DWC_OTG_GRSTCTL) = DWC_OTG_GRSTCTL_RXFFLSH |
		(DWC_OTG_GRSTCTL_TXFFLSH | DWC_OTG_GRSTCTL_TXFNUM_ALL);
	while (REBASE(DWC_OTG_GRSTCTL) &
				(DWC_OTG_GRSTCTL_RXFFLSH | DWC_OTG_GRSTCTL_TXFFLSH));
}