summaryrefslogtreecommitdiff
path: root/src/portable/raspberrypi
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-04-05 00:04:47 +0700
committerhathach <[email protected]>2022-04-05 00:04:47 +0700
commitd97c1546957059cfb3063b95d5287e2729f7f79a (patch)
treefd289e2b43c222ff87083b851b9a7c188cf186ea /src/portable/raspberrypi
parentd7d7e61f3437076a38ec031f2dc4cef38c8c831b (diff)
add need_pre for pio usb, but not work out well
Diffstat (limited to 'src/portable/raspberrypi')
-rw-r--r--src/portable/raspberrypi/pio_usb/hcd_pio_usb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c b/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c
index 839087957..c2ef54b9e 100644
--- a/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c
+++ b/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c
@@ -111,8 +111,12 @@ void hcd_int_disable(uint8_t rhport)
bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const * desc_ep)
{
+ hcd_devtree_info_t dev_tree;
+ hcd_devtree_get_info(dev_addr, &dev_tree);
+ bool const need_pre = (dev_tree.hub_addr && dev_tree.speed == TUSB_SPEED_LOW);
+
rhport = RHPORT_PIO(rhport);
- return pio_usb_endpoint_open(rhport, dev_addr, (uint8_t const*) desc_ep);
+ return pio_usb_endpoint_open(rhport, dev_addr, (uint8_t const*) desc_ep, need_pre);
}
bool hcd_edpt_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr, uint8_t * buffer, uint16_t buflen)