/* Enable USB Device Endpoint Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_EnableEP(uint32_t EPNum)
/* Enable USB Device Endpoint Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_EnableEP(uint32_t EPNum)
{
    if (EPNum & 0x80) {
        EPNum &= 0x0F;
        USB0->ENDPOINT[EPNum].ENDPT |= USB_ENDPT_EPHSHK_MASK |
                                       USB_ENDPT_EPTXEN_MASK;
    } else {
        USB0->ENDPOINT[EPNum].ENDPT |= USB_ENDPT_EPHSHK_MASK |
                                       USB_ENDPT_EPRXEN_MASK;
    }
}