resetDevice method

Future<bool> resetDevice(
  1. ConnectionHandle handle
)

Tries to reset the USB device. If the reset fails, the given connection handle will be closed and the USB device will appear to be disconnected then reconnected. In this case getDevices or findDevices must be called again to acquire the device.

|handle|: A connection handle to reset.

Implementation

Future<bool> resetDevice(ConnectionHandle handle) async {
  var $res =
      await promiseToFuture<bool>($js.chrome.usb.resetDevice(handle.toJS));
  return $res;
}