/* Usb interrupt enable/disable Parameters: ena: enable/disable 0: disable interrupt 1: enable interrupt  */
static void reset_state(void)
/* Usb interrupt enable/disable Parameters: ena: enable/disable 0: disable interrupt 1: enable interrupt  */
static void reset_state(void)
{
    unsigned int ep;
    suspended = 0;
    setup_waiting = 0;
    ep0_expect_zlp = 0;
    memset(ep_info, 0, sizeof(ep_info));
    MXC_USB->ep[0] |= (MXC_S_USB_EP_DIR_CONTROL | MXC_F_USB_EP_INT_EN | MXC_F_USB_EP_DT);
    for (ep = 1; ep < MXC_USB_NUM_EP; ep++) {
        MXC_USB->ep[ep] = MXC_F_USB_EP_DT;
    }
}