Skip to main content

Device Class

Namespace: GHIElectronics.TinyCLR.Devices.UsbHost.Descriptors · Assembly: GHIElectronics.TinyCLR.Devices.UsbHost

Device descriptor.

public class Device : BaseDescriptor

Constructors

Device(byte[] buffer)

public Device(byte[] buffer) : this(buffer, 0)

Constructs a new descriptor.

ParameterTypeDescription
bufferbyte[]The buffer with which to populate the descriptor.

Device(byte[] buffer, int offset)

public Device(byte[] buffer, int offset) : this()

Constructs a new descriptor.

ParameterTypeDescription
bufferbyte[]The buffer with which to populate the descriptor.
offsetintThe offset into the buffer at which to start.

Device()

protected Device() : base(DescriptorType.Device, Device.LENGTH)

Constructs a new descriptor.

Properties

UsbSpecificationNumber

public ushort UsbSpecificationNumber { get; set; }

USB specification number that the device implements as a BCD.

ClassCode

public byte ClassCode { get; set; }

The class code of the device.

SubclassCode

public byte SubclassCode { get; set; }

The subclass code.

ProtocolCode

public byte ProtocolCode { get; set; }

The protocol code.

MaximumPacketSize

public byte MaximumPacketSize { get; set; }

The max packet size for endpoint zero.

VendorId

public ushort VendorId { get; set; }

The vendor id.

ProductId

public ushort ProductId { get; set; }

The product id.

ReleaseNumber

public ushort ReleaseNumber { get; set; }

The device release number as a BCD.

ManufacturerIndex

public byte ManufacturerIndex { get; set; }

The manufacturer string descriptor index.

ProductIndex

public byte ProductIndex { get; set; }

The product string descriptor index.

SerialNumberIndex

public byte SerialNumberIndex { get; set; }

The serial number string descriptor index.

NumberOfConfigurations

public byte NumberOfConfigurations { get; set; }

The number of possible configurations.

Fields

LENGTH

public const byte LENGTH

The length of the descriptor in bytes.