public static Task <USBDevice> ReleaseInterface(this USBDevice device, USBInterface usbInterface) { if (usbInterface == null) { throw new ArgumentNullException(nameof(usbInterface)); } return(device.ReleaseInterface(usbInterface.InterfaceNumber)); }
public static Task <USBDevice> SelectAlternateInterface(this USBDevice device, USBInterface usbInterface, USBAlternateInterface usbAlternateInterface) { if (usbInterface == null) { throw new ArgumentNullException(nameof(usbInterface)); } if (usbAlternateInterface == null) { throw new ArgumentNullException(nameof(usbAlternateInterface)); } return(device.SelectAlternateInterface(usbInterface.InterfaceNumber, usbAlternateInterface.AlternateSetting)); }