Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeuz committed Aug 2, 2023
1 parent 1ff6f0b commit 58632fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dfu.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class Dfu {
await this._dev.claimInterface(this._interface);
this._claimed = true;
await this._dev.setAltSetting(this._interface, this._alternate);
let desc = await this._getConfigDescriptor(this._interface); // XXX: Changing the interface is not supported
let desc = await this._getConfigDescriptor(0); // Use the default config
desc = this._parseConfigDescriptor(desc);
this._allInterfaces = desc.interfaces;
}
Expand Down Expand Up @@ -223,7 +223,7 @@ class Dfu {
}
const ifaceName = await this._getStringDescriptor(iface.iInterface);
const memInfo = this._parseMemoryDescriptor(ifaceName);
await this._dev.setAltInterface(setting);
await this._dev.setAltSetting(this._interface, setting);
if (iface.dfuFunctional && iface.dfuFunctional.wTransferSize) {
this._transferSize = iface.dfuFunctional.wTransferSize;
} else {
Expand Down

0 comments on commit 58632fd

Please sign in to comment.