/* Reset USB Device Endpoint Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_ResetEP(U32 EPNum)
/* Reset USB Device Endpoint Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir Return Value: None  */
void USBD_ResetEP(U32 EPNum)
{
    ep_buffer_t *desc = get_desc(EPNum);
    EPNum &= EPNUM_MASK;
    MXC_USB->ep[EPNum] |= MXC_F_USB_EP_DT;
    if (ep_info[EPNum].type == MXC_S_USB_EP_DIR_OUT) {
        desc = get_desc(EPNum);
        desc->buf0_address = (uint32_t)ep_buffer[EPNum];
        desc->buf0_desc = sizeof(ep_buffer[EPNum]);
        MXC_USB->out_owner = (1 << EPNum);
    }
}