summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-09-27 19:34:17 +0800
committersakumisu <[email protected]>2022-09-27 19:34:24 +0800
commit85c0f658da3535dc5e92d3e5f149a4bb629339c5 (patch)
tree7346bd52877840060c258f20530ded7084e926cb
parent2d9862254efdc091a776f6b7fbecc2da67461665 (diff)
fix pipe param type in usbh_hport_activate_epx
-rw-r--r--core/usbh_core.c18
-rw-r--r--core/usbh_core.h4
2 files changed, 14 insertions, 8 deletions
diff --git a/core/usbh_core.c b/core/usbh_core.c
index 44ea7800..e5ea62bb 100644
--- a/core/usbh_core.c
+++ b/core/usbh_core.c
@@ -382,7 +382,7 @@ int usbh_hport_deactivate_ep0(struct usbh_hubport *hport)
return 0;
}
-int usbh_hport_activate_epx(usbh_pipe_t pipe, struct usbh_hubport *hport, struct usb_endpoint_descriptor *ep_desc)
+int usbh_hport_activate_epx(usbh_pipe_t *pipe, struct usbh_hubport *hport, struct usb_endpoint_descriptor *ep_desc)
{
struct usbh_endpoint_cfg ep_cfg = { 0 };
@@ -784,14 +784,20 @@ int lsusb(int argc, char **argv)
usb_slist_for_each(i, &hub_class_head)
{
struct usbh_hub *hub = usb_slist_entry(i, struct usbh_hub, list);
+
+ if (hub->is_roothub) {
+ USB_LOG_RAW("/: Hub %02u, ports=%u, is roothub\r\n", hub->index, hub->hub_desc.bNbrPorts);
+ } else {
+ USB_LOG_RAW("/: Hub %02u, ports=%u, mounted on Hub %02u:Port %u\r\n",
+ hub->index,
+ hub->hub_desc.bNbrPorts,
+ hub->parent->parent->index,
+ hub->parent->port);
+ }
+
for (uint8_t port = 0; port < hub->hub_desc.bNbrPorts; port++) {
hport = &hub->child[port];
if (hport->connected) {
- USB_LOG_RAW("/: Hub %02u,VID:PID 0x%04x:0x%04x\r\n",
- hub->index,
- hport->device_desc.idVendor,
- hport->device_desc.idProduct);
-
for (uint8_t i = 0; i < hport->config.config_desc.bNumInterfaces; i++) {
if (hport->config.intf[i].class_driver->driver_name) {
USB_LOG_RAW(" |__Port %u,Port addr:0x%02x,If %u,ClassDriver=%s\r\n",
diff --git a/core/usbh_core.h b/core/usbh_core.h
index 720a8a4f..4c44780b 100644
--- a/core/usbh_core.h
+++ b/core/usbh_core.h
@@ -163,12 +163,12 @@ struct usbh_hub {
usb_slist_t hub_event_list;
};
-int usbh_hport_activate_epx(usbh_pipe_t pipe, struct usbh_hubport *hport, struct usb_endpoint_descriptor *ep_desc);
+int usbh_hport_activate_epx(usbh_pipe_t *pipe, struct usbh_hubport *hport, struct usb_endpoint_descriptor *ep_desc);
/* usb host transfer wrapper */
/**
- * @brief Submit an bulk transfer to an endpoint.
+ * @brief Submit an control transfer to an endpoint.
* This is a blocking method; this method will not return until the transfer has completed.
* Default timeout is 500ms.
*