Helper to quickly build descriptors for arbitrary HIDs.
public struct HIDDeviceDescriptorBuilder
Constructors
Declaration
public HIDDeviceDescriptorBuilder(HID.GenericDesktop usage)
Parameters
HIDDeviceDescriptorBuilder(HID.UsagePage, Int32)
Declaration
public HIDDeviceDescriptorBuilder(HID.UsagePage usagePage, int usage)
Parameters
Fields
Declaration
Field Value
Type |
Description |
System.Int32 |
|
usagePage
Declaration
public HID.UsagePage usagePage
Field Value
Methods
Declaration
public HID.HIDDeviceDescriptorBuilder AddElement(HID.GenericDesktop usage, int sizeInBits)
Parameters
Returns
AddElement(HID.UsagePage, Int32, Int32)
Declaration
public HID.HIDDeviceDescriptorBuilder AddElement(HID.UsagePage usagePage, int usage, int sizeInBits)
Parameters
Type |
Name |
Description |
HID.UsagePage |
usagePage |
|
System.Int32 |
usage |
|
System.Int32 |
sizeInBits |
|
Returns
Declaration
public HID.HIDDeviceDescriptor Finish()
Returns
Declaration
public HID.HIDDeviceDescriptorBuilder StartReport(HID.HIDReportType reportType, int reportId = 1)
Parameters
Returns
Declaration
public HID.HIDDeviceDescriptorBuilder WithLogicalMinMax(int min, int max)
Parameters
Type |
Name |
Description |
System.Int32 |
min |
|
System.Int32 |
max |
|
Returns
Declaration
public HID.HIDDeviceDescriptorBuilder WithPhysicalMinMax(int min, int max)
Parameters
Type |
Name |
Description |
System.Int32 |
min |
|
System.Int32 |
max |
|
Returns