add usb_hc_low_level_deinit api

This commit is contained in:
sakumisu
2024-03-21 21:04:10 +08:00
parent 9dbc441082
commit 6cb442503d
3 changed files with 15 additions and 0 deletions

View File

@@ -410,6 +410,10 @@ __WEAK void usb_hc_low_level_init(struct usbh_bus *bus)
{
}
__WEAK void usb_hc_low_level_deinit(struct usbh_bus *bus)
{
}
int usb_hc_init(struct usbh_bus *bus)
{
int ret;
@@ -538,6 +542,7 @@ int usb_hc_deinit(struct usbh_bus *bus)
usb_osal_sem_delete(g_dwc2_hcd[bus->hcd.hcd_id].chan_pool[chidx].waitsem);
}
usb_hc_low_level_deinit(bus);
return 0;
}

View File

@@ -775,6 +775,10 @@ __WEAK void usb_hc_low_level2_init(struct usbh_bus *bus)
{
}
__WEAK void usb_hc_low_level_deinit(struct usbh_bus *bus)
{
}
int usb_hc_init(struct usbh_bus *bus)
{
uint32_t interval;
@@ -948,6 +952,7 @@ int usb_hc_deinit(struct usbh_bus *bus)
usb_osal_sem_delete(qh->waitsem);
}
usb_hc_low_level_deinit(bus);
return 0;
}

View File

@@ -415,6 +415,10 @@ __WEAK void usb_hc_low_level_init(struct usbh_bus *bus)
{
}
__WEAK void usb_hc_low_level_deinit(struct usbh_bus *bus)
{
}
int usb_hc_init(struct usbh_bus *bus)
{
uint8_t regval;
@@ -478,6 +482,7 @@ int usb_hc_deinit(struct usbh_bus *bus)
usb_osal_sem_delete(g_musb_hcd[bus->hcd.hcd_id].pipe_pool[i].waitsem);
}
usb_hc_low_level_deinit(bus);
return 0;
}