Merge pull request #10404 from kitcheck/node-usb-semiprivate-methods

Adding access to two semi-private node-usb methods
This commit is contained in:
Mine Starks
2016-08-01 12:29:44 -07:00
committed by GitHub
2 changed files with 6 additions and 0 deletions

View File

@@ -9,6 +9,9 @@ device.busNumber = 1;
device.deviceAddress = 1;
device.portNumbers = [1, 2, 3];
device.__open();
device.__claimInterface(0);
device.open(true);
device.close();
const xferDevice: usb.Device = device.controlTransfer(1, 1, 1, 1, 1, (error: string, buf: Buffer): usb.Device => new usb.Device());

View File

@@ -16,6 +16,9 @@ declare module "usb" {
public configDescriptor: ConfigDescriptor;
public interfaces: Array<Interface>;
__open(): void;
__claimInterface(addr: number): void;
open(defaultConfig?: boolean): void;
close(): void;
interface(addr: number): Interface;