fix hpm/usb_dc_hpm.c warning.
Signed-off-by: Zhihong Chen <zhihong.chen@hpmicro.com>
This commit is contained in:
@@ -262,7 +262,7 @@ static int usbh_rndis_connect(struct usbh_hubport *hport, uint8_t intf)
|
||||
ep_cfg.ep_addr = ep_desc->bEndpointAddress;
|
||||
ep_cfg.ep_type = ep_desc->bmAttributes & USB_ENDPOINT_TYPE_MASK;
|
||||
ep_cfg.ep_mps = ep_desc->wMaxPacketSize & USB_MAXPACKETSIZE_MASK;
|
||||
;
|
||||
|
||||
ep_cfg.ep_interval = ep_desc->bInterval;
|
||||
ep_cfg.hport = hport;
|
||||
usbh_pipe_alloc(&rndis_class->intin, &ep_cfg);
|
||||
|
||||
@@ -133,6 +133,9 @@ int usbd_ep_open(const struct usbd_endpoint_cfg *ep_cfg)
|
||||
|
||||
int usbd_ep_close(const uint8_t ep)
|
||||
{
|
||||
usb_device_handle_t *handle = g_hpm_udc.handle;
|
||||
|
||||
usb_device_edpt_close(handle, ep);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -173,7 +176,7 @@ int usbd_ep_start_write(const uint8_t ep, const uint8_t *data, uint32_t data_len
|
||||
g_hpm_udc.in_ep[ep_idx].xfer_len = data_len;
|
||||
g_hpm_udc.in_ep[ep_idx].actual_xfer_len = 0;
|
||||
|
||||
usb_device_edpt_xfer(handle, ep, data, data_len);
|
||||
usb_device_edpt_xfer(handle, ep, (uint8_t *)data, data_len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -202,7 +205,6 @@ int usbd_ep_start_read(const uint8_t ep, uint8_t *data, uint32_t data_len)
|
||||
void USBD_IRQHandler(void)
|
||||
{
|
||||
uint32_t int_status;
|
||||
uint32_t speed;
|
||||
usb_device_handle_t *handle = g_hpm_udc.handle;
|
||||
uint32_t transfer_len;
|
||||
|
||||
@@ -217,7 +219,6 @@ void USBD_IRQHandler(void)
|
||||
}
|
||||
|
||||
if (int_status & intr_reset) {
|
||||
speed = usb_device_get_port_speed(handle);
|
||||
memset(g_hpm_udc.in_ep, 0, sizeof(struct hpm_ep_state) * USB_NUM_BIDIR_ENDPOINTS);
|
||||
memset(g_hpm_udc.out_ep, 0, sizeof(struct hpm_ep_state) * USB_NUM_BIDIR_ENDPOINTS);
|
||||
usbd_event_reset_handler();
|
||||
@@ -237,7 +238,6 @@ void USBD_IRQHandler(void)
|
||||
if (!usb_device_get_port_ccs(handle)) {
|
||||
} else {
|
||||
if (usb_device_get_port_reset_status(handle) == 0) {
|
||||
uint32_t speed = usb_device_get_port_speed(handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user