/* USB Device Connect Function Called by the User to Connect/Disconnect USB Device Parameters: con: Connect/Disconnect Return Value: None  */
void USBD_Connect(BOOL con)
/* USB Device Connect Function Called by the User to Connect/Disconnect USB Device Parameters: con: Connect/Disconnect Return Value: None  */
void USBD_Connect(BOOL con)
{
    if (con) {
        MXC_USB->dev_intfl = 0xFFFF;
        MXC_USB->dev_inten |= CONNECT_INTS;
        MXC_USB->ep[0] |= MXC_F_USB_EP_INT_EN;
        MXC_USB->dev_cn |= (MXC_F_USB_DEV_CN_CONNECT | MXC_F_USB_DEV_CN_FIFO_MODE);
    } else {
        MXC_USB->dev_inten &= ~CONNECT_INTS;
        MXC_USB->ep[0] &= ~MXC_F_USB_EP_INT_EN;
        MXC_USB->dev_cn &= ~MXC_F_USB_DEV_CN_CONNECT;
    }
}