From d2c1180cce93d324811f6b1cb0722b2bbe660038 Mon Sep 17 00:00:00 2001 From: songyanguang <345810377@qq.com> Date: Fri, 28 Jun 2024 15:00:21 +0800 Subject: [PATCH] Modify usb core to call functions defined by xhci. --- .../services/drivers/usb/components/core/usbh_core.c | 5 ----- .../drivers/usb/components/port/xhci/usb_hc_xhci.h | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/core/usbh_core.c b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/core/usbh_core.c index 369ab2890..9356a2e64 100644 --- a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/core/usbh_core.c +++ b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/core/usbh_core.c @@ -1051,11 +1051,6 @@ int usbh_pipe_alloc(usbh_pipe_t *pipe, const struct usbh_endpoint_cfg *ep_cfg) return rc; } -int usbh_get_xhci_devaddr(usbh_pipe_t *pipe) -{ - return 0; -} - int usbh_get_devaddr(struct usbh_hubport *hport) { int dev_addr; diff --git a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.h b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.h index 12827defe..e501e466f 100644 --- a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.h +++ b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.h @@ -111,6 +111,14 @@ int xhci_usbh_ep_pipe_reconfigure(struct usbh_bus *usb, usbh_pipe_t pipe, uint8_ */ int xhci_usbh_pipe_alloc(usbh_pipe_t *pipe, const struct usbh_endpoint_cfg *ep_cfg); +/** + * @brief get device address. + * + * @param pipe A memory allocated for pipe. + * @return On success will return device address, and others indicate fail. + */ +int usbh_get_xhci_devaddr(usbh_pipe_t *pipe); + /** * @brief Free a pipe in which saves endpoint info. *