From 3aeadb3046ce133f1bf133a162c9ee380e82b3fc Mon Sep 17 00:00:00 2001 From: sakimisu <1203593632@qq.com> Date: Sat, 29 Apr 2023 15:17:59 +0800 Subject: [PATCH] fix build error --- class/hub/usbh_hub.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/class/hub/usbh_hub.c b/class/hub/usbh_hub.c index 002c6fd7..4222f381 100644 --- a/class/hub/usbh_hub.c +++ b/class/hub/usbh_hub.c @@ -567,11 +567,10 @@ static void usbh_hub_events(struct usbh_hub *hub) speed = USB_SPEED_LOW; } #ifdef CONFIG_USBHOST_XHCI - extern uint8_t usbh_get_port_speed(struct usbh_hub * hub, const uint8_t port); + else { + extern uint8_t usbh_get_port_speed(struct usbh_hub * hub, const uint8_t port); - /* USB3.0 speed cannot get from portstatus, checkout port speed instead */ - else - { + /* USB3.0 speed cannot get from portstatus, checkout port speed instead */ uint8_t super_speed = usbh_get_port_speed(hub, port + 1); if (super_speed > USB_SPEED_HIGH) { /* assert that when using USB 3.0 ports, attached device must also be USB 3.0 speed */