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