mirror of https://github.com/ARMmbed/mbed-os.git
Add checking for MAX_HUB_NB in a part of code that depend on MAX_HUB_NB
parent
fd06eb2534
commit
4bba4e59fc
|
@ -88,11 +88,14 @@ void USBHost::usb_process()
|
||||||
/* check that hub is connected to root port */
|
/* check that hub is connected to root port */
|
||||||
if (usb_msg->hub_parent) {
|
if (usb_msg->hub_parent) {
|
||||||
/* a hub device must be present */
|
/* a hub device must be present */
|
||||||
|
#if MAX_HUB_NB
|
||||||
|
|
||||||
for (k = 0; k < MAX_HUB_NB; k++) {
|
for (k = 0; k < MAX_HUB_NB; k++) {
|
||||||
if ((&hubs[k] == usb_msg->hub_parent) && (hub_in_use[k])) {
|
if ((&hubs[k] == usb_msg->hub_parent) && (hub_in_use[k])) {
|
||||||
hub_unplugged=false;
|
hub_unplugged=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
hub_unplugged = false;
|
hub_unplugged = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue