public bool GetBosSSCapabilityDescriptor(ref USB_BOS_SS_DEVICE_CAPABILITY 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.SS_DeviceCap != null) {// SS capability is defined descr.bLength = USBBos.SS_DeviceCap.Lenght; descr.bDescriptorType = USBBos.SS_DeviceCap.DescriptorType; descr.bDevCapabilityType = USBBos.SS_DeviceCap.DevCapabilityType; descr.bFunctionalitySupporte = USBBos.SS_DeviceCap.FunctionalitySupporte; descr.bmAttribute = USBBos.SS_DeviceCap.bmAttribute; descr.bU1DevExitLat = USBBos.SS_DeviceCap.U1DevExitLat; descr.bU2DevExitLat = USBBos.SS_DeviceCap.U2DevExitLat; } else // not defined return false; return true; }
protected ushort _wSpeedsSuported; //low speed supported if set,full speed supported if set,high speed supported if set,super speed supported if set,15:4 nt used #endregion Fields #region Constructors internal unsafe CyBOS_SS_DEVICE_CAPABILITY(IntPtr handle, USB_BOS_SS_DEVICE_CAPABILITY* USB_SuperSpeedUsb) { _bLength = USB_SuperSpeedUsb->bLength; _bDescriptorType = USB_SuperSpeedUsb->bDescriptorType; _bDevCapabilityType = USB_SuperSpeedUsb->bDevCapabilityType; _bFunctionalitySupporte = USB_SuperSpeedUsb->bFunctionalitySupporte; _bmAttribute = USB_SuperSpeedUsb->bmAttribute; _bU1DevExitLat = USB_SuperSpeedUsb->bU1DevExitLat; _bU2DevExitLat = USB_SuperSpeedUsb->bU2DevExitLat; }