コード例 #1
0
        internal UsbInterfaceInfo(UsbDevice usbDevice, MonoUsbAltInterfaceDescriptor monoUSBAltInterfaceDescriptor)
        {
            mUsbDevice = usbDevice;

            mUsbInterfaceDescriptor = new UsbInterfaceDescriptor(monoUSBAltInterfaceDescriptor);
            List <MonoUsbEndpointDescriptor> monoUsbEndpoints = monoUSBAltInterfaceDescriptor.EndpointList;

            foreach (MonoUsbEndpointDescriptor monoUSBEndpoint in monoUsbEndpoints)
            {
                mEndpointInfo.Add(new UsbEndpointInfo(monoUSBEndpoint));
            }
        }
コード例 #2
0
 internal UsbInterfaceDescriptor(MonoUsbAltInterfaceDescriptor altInterfaceDescriptor)
 {
     AlternateID    = altInterfaceDescriptor.bAlternateSetting;
     Class          = altInterfaceDescriptor.bInterfaceClass;
     DescriptorType = altInterfaceDescriptor.bDescriptorType;
     EndpointCount  = altInterfaceDescriptor.bNumEndpoints;
     InterfaceID    = altInterfaceDescriptor.bInterfaceNumber;
     Length         = altInterfaceDescriptor.bLength;
     Protocol       = altInterfaceDescriptor.bInterfaceProtocol;
     StringIndex    = altInterfaceDescriptor.iInterface;
     SubClass       = altInterfaceDescriptor.bInterfaceSubClass;
 }