Remove blocking option from USB connect

Remove the option to block in USBDevice::connect since this
should be handled at a higher level. Also call init to ensure that
the USBDevice has been initalized.
feature-hal-spec-usb-device
Russ Butler 2018-04-30 18:57:24 -05:00 committed by Russ Butler
parent 3c46367634
commit 7df887fe69
2 changed files with 8 additions and 10 deletions

View File

@ -994,20 +994,20 @@ bool USBDevice::configured()
return ret;
}
void USBDevice::connect(bool blocking)
void USBDevice::connect()
{
/* Connect device */
lock();
/* Ensure device has been initialized */
init();
/* Connect device */
if (!_connected) {
_phy->connect();
_connected = true;
}
unlock();
if (blocking) {
/* Block if not configured */
while (!configured());
}
unlock();
}
void USBDevice::disconnect()

View File

@ -117,10 +117,8 @@ public:
/**
* Connect a device
*
* @param blocking: block if not configured
*/
void connect(bool blocking = true);
void connect();
/**
* Disconnect a device