/* Enable USB Device Endpoint Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_EnableEP(U32 EPNum)
/* Enable USB Device Endpoint Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_EnableEP(U32 EPNum)
{
    uint32_t u32Ep, u32Num, u32Intr;
    u32Num = EPNum & 0x0F;
    u32Ep = USBD_NUM_TO_EP(u32Num);
    HSUSBD->GINTEN |= (0x1UL << (HSUSBD_GINTEN_EPAIEN_Pos + (u32Num - USBD_EP_TO_NUM(EPA))));
    if (EPNum & 0x80) {
        u32Intr = HSUSBD_EPINTEN_TXPKIEN_Msk;
    } else {
        u32Intr = HSUSBD_EPINTEN_RXPKIEN_Msk | HSUSBD_EPINTEN_SHORTRXIEN_Msk | HSUSBD_EPINTEN_BUFFULLIEN_Msk;
    }
    HSUSBD_ENABLE_EP_INT(u32Ep, u32Intr);
}