rewrite xhci function usbh_get_port_speed

This commit is contained in:
songyanguang 2024-06-24 15:08:02 +08:00
parent dd55f8d731
commit aa68affc46
2 changed files with 19 additions and 0 deletions

View File

@ -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;

View File

@ -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.
*