Interface USBOptions

USB Options

interface USBOptions {
    allowAllDevices?: boolean;
    allowedDevices?: USBDeviceFilter[];
    deviceTimeout?: number;
    devicesFound?: ((devices) => Promise<void | USBDevice>);
}

Properties

allowAllDevices?: boolean

Optional flag to automatically allow all devices

allowedDevices?: USBDeviceFilter[]

Optional array of preconfigured allowed devices

deviceTimeout?: number

Optional timeout (in milliseconds) to use for the device control transfers

devicesFound?: ((devices) => Promise<void | USBDevice>)

Optional device found callback function to allow the user to select a device

Type declaration

    • (devices): Promise<void | USBDevice>
    • Parameters

      • devices: USBDevice[]

      Returns Promise<void | USBDevice>