コード例 #1
0
        public static Task <USBDevice> ReleaseInterface(this USBDevice device, USBInterface usbInterface)
        {
            if (usbInterface == null)
            {
                throw new ArgumentNullException(nameof(usbInterface));
            }

            return(device.ReleaseInterface(usbInterface.InterfaceNumber));
        }
コード例 #2
0
        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));
        }