/* Set Stall for USB Device Endpoint Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_SetStallEP(U32 EPNum)
/* Set Stall for USB Device Endpoint Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_SetStallEP(U32 EPNum)
{
    uint32_t u32Ep, u32Num;
    u32Num = EPNum & 0x0F;
    u32Ep = USBD_NUM_TO_EP(u32Num);
    if (u32Ep == CEP) {
        HSUSBD_SET_CEP_STATE(HSUSBD_CEPCTL_STALL);
    } else {
        HSUSBD->EP[u32Ep].EPRSPCTL = (HSUSBD->EP[u32Ep].EPRSPCTL & 0xF7UL) | HSUSBD_EP_RSPCTL_HALT;
    }
}