mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
More elegant way of doing: 7990c32ad6
This commit is contained in:
parent
59d20a17c8
commit
6adc0843d5
1 changed files with 17 additions and 17 deletions
6
Usb.cpp
6
Usb.cpp
|
@ -579,8 +579,9 @@ uint8_t USB::AttemptConfig(uint8_t driver, uint8_t parent, uint8_t port, bool lo
|
|||
// reset parent port
|
||||
devConfig[parent]->ResetHubPort(port);
|
||||
}
|
||||
}
|
||||
if (!rcode || rcode == USB_ERROR_CONFIG_REQUIRES_ADDITIONAL_RESET) {
|
||||
} else if (rcode)
|
||||
return rcode;
|
||||
|
||||
rcode = devConfig[driver]->Init(parent, port, lowspeed);
|
||||
if (rcode == hrJERR) { // Some devices returns this when plugged in - trying to initialize the device again usually works
|
||||
delay(100);
|
||||
|
@ -598,7 +599,6 @@ uint8_t USB::AttemptConfig(uint8_t driver, uint8_t parent, uint8_t port, bool lo
|
|||
devConfig[parent]->ResetHubPort(port);
|
||||
}
|
||||
}
|
||||
}
|
||||
return rcode;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue