cherry-embedded / CherryUSB

CherryUSB is a tiny and portable USB Stack (device & host) for embedded system with USB IP
https://cherryusb.readthedocs.io/
Apache License 2.0
1.14k stars 245 forks source link

Update usbh_hub.c #193

Closed Zoumax closed 2 months ago

Zoumax commented 2 months ago

Fix an error : When initializing usb host with busid not equal zero, like "usbh_initialize(1, CONFIG_HPM_USBH_BASE); ", then a hub will not be recognized as normal. Usually got an error "[E/usbh_hub] invalid device bLength 0xXX".

您好,我最近在先楫6750上调USB,发现如果初始化usbhost时busid不为0,那么hub不会被正确识别。此修改可规避这个问题,但我不确定是否为最正确的修复方式。

sakumisu commented 2 months ago

这边确实漏了,但是你的修改不正确

sakumisu commented 2 months ago

& 应该需要去掉

sakumisu commented 2 months ago

还有漏的。这个我自己修改吧。感谢。