mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-19 23:45:28 +02:00
feat(usb/host): Add High Speed enumeration types
This commit is contained in:
@@ -147,11 +147,12 @@ esp_err_t usb_phy_otg_dev_set_speed(usb_phy_handle_t handle, usb_phy_speed_t spe
|
||||
USBPHY_TAG, "set speed not supported");
|
||||
|
||||
handle->otg_speed = speed;
|
||||
usb_priv_speed_t hal_speed = 0;
|
||||
if (speed == USB_PHY_SPEED_LOW) {
|
||||
hal_speed = USB_PRIV_SPEED_LOW;
|
||||
} else if (speed == USB_PHY_SPEED_FULL) {
|
||||
hal_speed = USB_PRIV_SPEED_FULL;
|
||||
usb_priv_speed_t hal_speed;
|
||||
switch (speed) {
|
||||
case USB_PHY_SPEED_LOW: hal_speed = USB_PRIV_SPEED_LOW; break;
|
||||
case USB_PHY_SPEED_FULL: hal_speed = USB_PRIV_SPEED_FULL; break;
|
||||
case USB_PHY_SPEED_HIGH: hal_speed = USB_PRIV_SPEED_HIGH; break;
|
||||
default: abort();
|
||||
}
|
||||
usb_phy_hal_int_load_conf_dev(&(handle->hal_context), hal_speed);
|
||||
return ESP_OK;
|
||||
|
||||
Reference in New Issue
Block a user