third_party/libusb/webport/src/libusb-to-chrome-usb-adaptor.js
/**
   * Performs a bulk or an interrupt transfer (depending on the passed API
   * method).
   * @private
   * @param {!Function} chromeUsbApiMethod
   * @param {number} deviceId
   * @param {number} deviceHandle
   * @param {!LibusbJsGenericTransferParameters} parameters
   * @return {!Promise<!LibusbJsTransferResult>}
   */
Performs a bulk or an interrupt transfer (depending on the passed API
method).
Performs a bulk or an interrupt transfer ( depending on the passed API method ) .
async genericTransfer_(
      chromeUsbApiMethod, deviceId, deviceHandle, parameters) {
    const chromeUsbConnectionHandle =
        this.getConnectionHandleWithDeviceIdOrThrow_(deviceId, deviceHandle);
    const chromeUsbGenericTransferInfo =
        getChromeUsbGenericTransferInfo(parameters);
    const chromeUsbTransferResultInfo =
         (await promisify(
            chromeUsbApiMethod, chromeUsbConnectionHandle,
            chromeUsbGenericTransferInfo));
    return getLibusbJsTransferResultOrThrow(chromeUsbTransferResultInfo);
  }
async genericTransfer_ ( chromeUsbApiMethod , deviceId , deviceHandle , parameters ) { const chromeUsbConnectionHandle = this . getConnectionHandleWithDeviceIdOrThrow_ ( deviceId , deviceHandle ) ; const chromeUsbGenericTransferInfo = getChromeUsbGenericTransferInfo ( parameters ) ; const chromeUsbTransferResultInfo = ( await promisify ( chromeUsbApiMethod , chromeUsbConnectionHandle , chromeUsbGenericTransferInfo ) ) ; return getLibusbJsTransferResultOrThrow ( chromeUsbTransferResultInfo ) ; }
Performs a bulk or an interrupt transfer (depending on the passed API
 method).
Performs a bulk or an interrupt transfer ( depending on the passed API method ) .
/** @type {!chrome.usb.TransferResultInfo} */