コード例 #1
0
 public UsbDeviceDescriptor(short usbversion, UsbClassCode deviceClass, Byte deviceSubClass, Byte deviceProtocol, UInt16 deviceVersion, Byte maxControlPacketSize, UInt16 vendorID, UInt16 productID, Byte manufacturerString, Byte productString, Byte serialNumberString, Byte numConfigurations) : this()
 {
     bmLength               = (Byte)Size;
     bType                  = (Byte)UsbDescriptorType.Device;
     bcdUSB                 = UsbDescriptor.ToLittleEndian(usbversion);
     bDeviceClass           = (Byte)deviceClass;
     bDeviceSubClass        = deviceSubClass;
     bDeviceProtocol        = deviceProtocol;
     bcdDevice              = UsbDescriptor.ToLittleEndian((Int16)deviceVersion);
     bMaxControlPacketSize  = maxControlPacketSize;
     idVendor               = UsbDescriptor.ToLittleEndian((Int16)vendorID);
     idProduct              = UsbDescriptor.ToLittleEndian((Int16)productID);
     iManufacturer          = manufacturerString;
     iProduct               = productString;
     iSerialNumber          = serialNumberString;
     this.numConfigurations = numConfigurations;
 }
コード例 #2
0
ファイル: UsbInfo.cs プロジェクト: UCIS/UCIS.Core
 public UsbInterfaceInfo FindInterfaceByClass(UsbClassCode usbclass, Byte subclass)
 {
     return(FindInterface(delegate(UsbInterfaceInfo interf) { return interf.Descriptor.InterfaceClass == usbclass && interf.Descriptor.InterfaceSubClass == subclass; }));
 }
コード例 #3
0
 public UsbInterfaceDescriptor(Byte interfaceNumber, Byte alternateSetting, Byte numEndpoints, UsbClassCode interfaceClass, Byte interfaceSubClass, Byte interfaceProtocol, Byte stringID) : this()
 {
     bmLength           = (Byte)Size;
     bType              = (Byte)UsbDescriptorType.Interface;
     bInterfaceNumber   = interfaceNumber;
     bAlternateSetting  = alternateSetting;
     bNumEndpoints      = numEndpoints;
     bInterfaceClass    = (Byte)interfaceClass;
     bInterfaceSubClass = interfaceSubClass;
     bInterfaceProtocol = interfaceProtocol;
     bInterfaceStringID = stringID;
 }