summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakimisu <[email protected]>2023-04-29 15:17:59 +0800
committersakimisu <[email protected]>2023-04-29 15:17:59 +0800
commit3aeadb3046ce133f1bf133a162c9ee380e82b3fc (patch)
tree8d2d0da35be4792d2e57e773afa8ebf91ef35d43
parent0bfa7493334c800032b1af13d8c0a712b56c2385 (diff)
fix build error
-rw-r--r--class/hub/usbh_hub.c7
1 files 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 */