add usbd_get_port_speed api to use different config descriptors

This commit is contained in:
sakimisu
2022-11-18 22:26:09 +08:00
parent 9ef2988f6a
commit cf97d5276e
10 changed files with 91 additions and 2 deletions

View File

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