Exemplo n.º 1
0
        public bool GetBosUSB20DeviceExtensionDescriptor(ref USB_BOS_USB20_DEVICE_EXTENSION descr)
        {
            // USB3.0 device specific descriptor, for USB2.0 device this function will return false
            if (_alreadyDisposed) throw new ObjectDisposedException("");
            if ((_bcdUSB & CyConst.bcdUSBJJMask) != CyConst.USB30MajorVer)
                return false;
            if (USBBos.USB20_DeviceExt != null)
            {// USB20 device extesion is defined
                descr.bLength = USBBos.USB20_DeviceExt.Lenght;
                descr.bDescriptorType = USBBos.USB20_DeviceExt.DescriptorType;
                descr.bDevCapabilityType = USBBos.USB20_DeviceExt.DevCapabilityType;
                descr.bmAttribute = USBBos.USB20_DeviceExt.bmAttribute;
            }
            else// not defined
                return false;

            return true;
        }
Exemplo n.º 2
0
        protected uint _bmAttribute; // Bitmap encoding for supprted feature and  Link power managment supprted if set

        #endregion Fields

        #region Constructors

        internal unsafe CyBOS_USB20_DEVICE_EXT(IntPtr handle, USB_BOS_USB20_DEVICE_EXTENSION* USB20_DeviceExt)
        {
            _bLength = USB20_DeviceExt->bLength;
            _bDescriptorType = USB20_DeviceExt->bDescriptorType;
            _bDevCapabilityType = USB20_DeviceExt->bDevCapabilityType;
            _bmAttribute = USB20_DeviceExt->bmAttribute;
        }