Modify xhci functions for USB core

This commit is contained in:
xj 2024-06-18 23:21:44 -07:00
parent 83a4b774b5
commit eef25d3004
1 changed files with 11 additions and 2 deletions

View File

@ -776,8 +776,17 @@ int xhci_usbh_roothub_control(struct usbh_bus *usb, struct usb_setup_packet *set
}
int xhci_usbh_ep_pipe_reconfigure(struct usbh_bus *usb, usbh_pipe_t pipe, uint8_t dev_addr, uint8_t ep_mps, uint8_t mult){
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;
size_t old_mtu = ppipe->mtu;
int rc = 0;
if (mtu != old_mtu) {
ppipe->mtu = mtu;
rc = xhci_endpoint_mtu(ppipe);
}
return rc;
}