summaryrefslogtreecommitdiff
path: root/class
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2026-04-03 18:45:51 +0800
committersakumisu <[email protected]>2026-04-03 18:45:51 +0800
commit3d97aeebdef5d8a8ec3907d3f4f44816d49cd76e (patch)
tree7938d3b35d8e8e4abf8320f151e1b3452030be5b /class
parent03c6bfed39a4dbdb0b342172b5ece6d9435c4b5b (diff)
fix(core): adjust init&deinit event callback position
Signed-off-by: sakumisu <[email protected]>
Diffstat (limited to 'class')
-rw-r--r--class/hub/usbh_hub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/class/hub/usbh_hub.c b/class/hub/usbh_hub.c
index 910aa0c2..cef8d55b 100644
--- a/class/hub/usbh_hub.c
+++ b/class/hub/usbh_hub.c
@@ -681,8 +681,9 @@ static void usbh_hub_thread(CONFIG_USB_OSAL_THREAD_SET_ARGV)
struct usbh_bus *bus = (struct usbh_bus *)CONFIG_USB_OSAL_THREAD_GET_ARGV;
- usb_hc_init(bus);
bus->event_handler(bus->busid, USB_HUB_INDEX_ANY, USB_HUB_PORT_ANY, USB_INTERFACE_ANY, USBH_EVENT_INIT);
+ usb_hc_init(bus);
+
while (1) {
ret = usb_osal_mq_recv(bus->hub_mq, (uintptr_t *)&hub, USB_OSAL_WAITING_FOREVER);
if (ret < 0) {