/* Disable USB Device Endpoint Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_DisableEP(uint32_t EPNum)
/* Disable USB Device Endpoint Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_DisableEP(uint32_t EPNum)
{
    if (EPNum & 0x80) {
        EPNum &= 0x7F;
        ENDPTCTRL(EPNum) &= ~(1UL << 23);
    } else {
        ENDPTCTRL(EPNum)     &= ~(1UL << 7);
    }
}