refactor(usb/host): Make private hal types USB_DWC specific

This commit is contained in:
Tomas Rezucha
2023-11-29 16:30:04 +08:00
parent 42277ac868
commit 71cd4df75a
8 changed files with 65 additions and 95 deletions

View File

@@ -147,14 +147,7 @@ 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;
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);
usb_phy_hal_int_load_conf_dev(&(handle->hal_context), speed);
return ESP_OK;
}