remove port param in usbd_get_port_speed

This commit is contained in:
sakumisu
2024-04-29 11:35:29 +08:00
parent 45e9a2fde8
commit 2da4edf76b
10 changed files with 12 additions and 12 deletions

View File

@@ -36,11 +36,11 @@ int usbd_set_address(uint8_t busid, const uint8_t addr);
/** /**
* @brief Get USB device speed * @brief Get USB device speed
* *
* @param[in] port port index * @param[in] busid bus index
* *
* @return port speed, USB_SPEED_LOW or USB_SPEED_FULL or USB_SPEED_HIGH * @return port speed, USB_SPEED_LOW or USB_SPEED_FULL or USB_SPEED_HIGH
*/ */
uint8_t usbd_get_port_speed(uint8_t busid, const uint8_t port); uint8_t usbd_get_port_speed(uint8_t busid);
/** /**
* @brief configure and enable endpoint. * @brief configure and enable endpoint.

View File

@@ -613,7 +613,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
return 0; return 0;
} }
uint8_t usbd_get_port_speed(uint8_t busid, const uint8_t port) uint8_t usbd_get_port_speed(uint8_t busid)
{ {
uint8_t speed = 3; uint8_t speed = 3;

View File

@@ -223,7 +223,7 @@ int usbd_set_address(uint8_t busid, const uint8_t address)
return 0; return 0;
} }
uint8_t usbd_get_port_speed(uint8_t busid, const uint8_t port) uint8_t usbd_get_port_speed(uint8_t busid)
{ {
return USB_SPEED_FULL; return USB_SPEED_FULL;
} }

View File

@@ -101,7 +101,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
return 0; return 0;
} }
uint8_t usbd_get_port_speed(uint8_t busid, const uint8_t port) uint8_t usbd_get_port_speed(uint8_t busid)
{ {
return USB_SPEED_FULL; return USB_SPEED_FULL;
} }

View File

@@ -101,7 +101,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
return 0; return 0;
} }
uint8_t usbd_get_port_speed(uint8_t busid, const uint8_t port) uint8_t usbd_get_port_speed(uint8_t busid)
{ {
return USB_SPEED_HIGH; return USB_SPEED_HIGH;
} }

View File

@@ -671,7 +671,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
return 0; return 0;
} }
uint8_t usbd_get_port_speed(uint8_t busid, const uint8_t port) uint8_t usbd_get_port_speed(uint8_t busid)
{ {
uint8_t speed; uint8_t speed;
uint32_t DevEnumSpeed = USB_OTG_DEV->DSTS & USB_OTG_DSTS_ENUMSPD; uint32_t DevEnumSpeed = USB_OTG_DEV->DSTS & USB_OTG_DSTS_ENUMSPD;
@@ -720,7 +720,7 @@ int usbd_ep_open(uint8_t busid, const struct usb_endpoint_descriptor *ep)
USB_LOG_ERR("Ep addr %02x fifo overflow\r\n", ep->bEndpointAddress); USB_LOG_ERR("Ep addr %02x fifo overflow\r\n", ep->bEndpointAddress);
return -2; return -2;
} }
g_dwc2_udc.in_ep[ep_idx].ep_mps = USB_GET_MAXPACKETSIZE(ep->wMaxPacketSize); g_dwc2_udc.in_ep[ep_idx].ep_mps = USB_GET_MAXPACKETSIZE(ep->wMaxPacketSize);
g_dwc2_udc.in_ep[ep_idx].ep_type = USB_GET_ENDPOINT_TYPE(ep->bmAttributes); g_dwc2_udc.in_ep[ep_idx].ep_type = USB_GET_ENDPOINT_TYPE(ep->bmAttributes);

View File

@@ -117,7 +117,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
return 0; return 0;
} }
uint8_t usbd_get_port_speed(uint8_t busid, const uint8_t port) uint8_t usbd_get_port_speed(uint8_t busid)
{ {
return USB_SPEED_FULL; return USB_SPEED_FULL;
} }

View File

@@ -128,7 +128,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
return 0; return 0;
} }
uint8_t usbd_get_port_speed(uint8_t busid, const uint8_t port) uint8_t usbd_get_port_speed(uint8_t busid)
{ {
(void)port; (void)port;
uint8_t speed; uint8_t speed;

View File

@@ -252,7 +252,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
return 0; return 0;
} }
uint8_t usbd_get_port_speed(uint8_t busid, const uint8_t port) uint8_t usbd_get_port_speed(uint8_t busid)
{ {
uint8_t speed = USB_SPEED_UNKNOWN; uint8_t speed = USB_SPEED_UNKNOWN;

View File

@@ -165,7 +165,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
return 0; return 0;
} }
uint8_t usbd_get_port_speed(uint8_t busid, const uint8_t port) uint8_t usbd_get_port_speed(uint8_t busid)
{ {
return USB_SPEED_FULL; return USB_SPEED_FULL;
} }