/* Disable USB Endpoint Parameters: EPNum: Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_DisableEP(uint32_t EPNum)
/* Disable USB Endpoint Parameters: EPNum: Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_DisableEP(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);
    }
}