/* USB Device Configure Function Parameters: cfg: Device Configure/Deconfigure Return Value: None  */
void USBD_Configure(BOOL cfg)
/* USB Device Configure Function Parameters: cfg: Device Configure/Deconfigure Return Value: None  */
void USBD_Configure(BOOL cfg)
{
    uint32_t i;
    if (!cfg) {
        for (i = 2; i < (2 * (USBD_EP_NUM + 1)); i++) {
            Ep[i].buf = 0;
            Ep[i].maxPacket = 0;
        }
        BufUsed = 2 * USBD_MAX_PACKET0;
    }
}