Prechádzať zdrojové kódy

remove port param in usbd_get_port_speed

sakumisu 1 rok pred
rodič
commit
2da4edf76b

+ 2 - 2
common/usb_dc.h

@@ -36,11 +36,11 @@ int usbd_set_address(uint8_t busid, const uint8_t addr);
 /**
  * @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
  */
-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.

+ 1 - 1
port/bouffalolab/usb_dc_bl.c

@@ -613,7 +613,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
     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;
 

+ 1 - 1
port/ch32/usb_ch58x_dc_usbfs.c

@@ -223,7 +223,7 @@ int usbd_set_address(uint8_t busid, const uint8_t address)
     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;
 }

+ 1 - 1
port/ch32/usb_dc_usbfs.c

@@ -101,7 +101,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
     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;
 }

+ 1 - 1
port/ch32/usb_dc_usbhs.c

@@ -101,7 +101,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
     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;
 }

+ 2 - 2
port/dwc2/usb_dc_dwc2.c

@@ -671,7 +671,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
     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;
     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);
             return -2;
         }
-        
+
         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);
 

+ 1 - 1
port/fsdev/usb_dc_fsdev.c

@@ -117,7 +117,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
     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;
 }

+ 1 - 1
port/hpm/usb_dc_hpm.c

@@ -128,7 +128,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
     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;
     uint8_t speed;

+ 1 - 1
port/musb/usb_dc_musb.c

@@ -252,7 +252,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
     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;
 

+ 1 - 1
port/nuvoton/usb_dc_usbfs.c

@@ -165,7 +165,7 @@ int usbd_set_address(uint8_t busid, const uint8_t addr)
     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;
 }