/* USB Device Reset Function Called automatically on USB Device Reset Return Value: None  */
void USBD_Reset(void)
/* USB Device Reset Function Called automatically on USB Device Reset Return Value: None  */
void USBD_Reset(void)
{
    uint32_t i;
    for (i = 0; i < HSUSBD_MAX_EP; i++) {
        HSUSBD->EP[EPA + i].EPRSPCTL = HSUSBD_EPRSPCTL_FLUSH_Msk;
    }
    if (HSUSBD->OPER & HSUSBD_OPER_CURSPD_Msk) {
        USBD_HighSpeed = __TRUE;
    } else {
        USBD_HighSpeed = __FALSE;
    }
    g_u32FreeBufAddr = CEP_BUF_BASE + CEP_BUF_LEN;
    g_u8StatusIn = 0;
    HSUSBD_SET_ADDR(0);
}