/* 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) {
        CNTR = CNTR_FRES;
        CNTR = 0;
        ISTR = 0;
        CNTR = CNTR_RESETM | CNTR_SUSPM | CNTR_WKUPM;
        USB_CONNECT_ON();
    } else {
        CNTR = CNTR_FRES | CNTR_PDWN;
        USB_CONNECT_OFF();
    }
}