diff --git a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c index 099c2bb0e..cf81dd396 100644 --- a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c +++ b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c @@ -34,6 +34,10 @@ History: 1. Date: 2024-06-17 Author: AIIT XUOS Lab Modification: rewrite xhci functions to dock with USB core layer, so that the USB core can easily expand to other USB IP. + +2. Date: 2024-06-24 +Author: AIIT XUOS Lab +Modification: rewrite xhci function usbh_get_port_speed to dock with USB core layer. *************************************************/ #include "usb_hc_xhci.h" #include "usbh_hub.h" @@ -775,6 +779,12 @@ int xhci_usbh_roothub_control(struct usbh_bus *usb, struct usb_setup_packet *set return 0; } +// TODO: +uint8_t xhci_usbh_get_port_speed(struct usbh_hub *hub, const uint8_t port) +{ + return 0; +} + int xhci_usbh_ep_pipe_reconfigure(struct usbh_bus *usb, usbh_pipe_t pipe, uint8_t dev_addr, uint8_t mtu, uint8_t speed){ struct xhci_endpoint *ppipe = (struct xhci_endpoint *)pipe; 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 a71e7fc4f..1af816dfe 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 @@ -68,6 +68,15 @@ uint16_t xhci_usbh_get_frame_number(void); */ int xhci_usbh_roothub_control(struct usbh_bus *usb, struct usb_setup_packet *setup, uint8_t *buf); +/** + * @brief get port speed. + * + * @param hport Hub of USB device. + * @param port Port index. + * @return On success will return speed, and others indicate fail. + */ +uint8_t xhci_usbh_get_port_speed(struct usbh_hub *hub, const uint8_t port); + /** * @brief reconfig endpoint pipe. *