265 lines
15 KiB
C
265 lines
15 KiB
C
#pragma once
|
|
|
|
// AUTO-GENERATED by WaratahCmd.exe (https://github.com/microsoft/hidtools)
|
|
|
|
// HID Usage Tables: 1.6.0
|
|
// Descriptor size: 292 (bytes)
|
|
// +----------+---------+-------------------+
|
|
// | ReportId | Kind | ReportSizeInBytes |
|
|
// +----------+---------+-------------------+
|
|
// | 1 | Feature | 22 |
|
|
// +----------+---------+-------------------+
|
|
// | 2 | Feature | 2 |
|
|
// +----------+---------+-------------------+
|
|
// | 3 | Feature | 28 |
|
|
// +----------+---------+-------------------+
|
|
// | 4 | Feature | 50 |
|
|
// +----------+---------+-------------------+
|
|
// | 5 | Feature | 9 |
|
|
// +----------+---------+-------------------+
|
|
// | 6 | Feature | 1 |
|
|
// +----------+---------+-------------------+
|
|
static const uint8_t hidReportDescriptor[] =
|
|
{
|
|
0x05, 0x59, // UsagePage(Lighting And Illumination[0x0059])
|
|
0x09, 0x01, // UsageId(LampArray[0x0001])
|
|
0xA1, 0x01, // Collection(Application)
|
|
0x85, 0x01, // ReportId(1)
|
|
0x09, 0x02, // UsageId(LampArrayAttributesReport[0x0002])
|
|
0xA1, 0x02, // Collection(Logical)
|
|
0x09, 0x03, // UsageId(LampCount[0x0003])
|
|
0x15, 0x00, // LogicalMinimum(0)
|
|
0x27, 0xFF, 0xFF, 0x00, 0x00, // LogicalMaximum(65,535)
|
|
0x95, 0x01, // ReportCount(1)
|
|
0x75, 0x10, // ReportSize(16)
|
|
0xB1, 0x03, // Feature(Constant, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0x09, 0x04, // UsageId(BoundingBoxWidthInMicrometers[0x0004])
|
|
0x09, 0x05, // UsageId(BoundingBoxHeightInMicrometers[0x0005])
|
|
0x09, 0x06, // UsageId(BoundingBoxDepthInMicrometers[0x0006])
|
|
0x09, 0x07, // UsageId(LampArrayKind[0x0007])
|
|
0x09, 0x08, // UsageId(MinUpdateIntervalInMicroseconds[0x0008])
|
|
0x27, 0xFF, 0xFF, 0xFF, 0x7F, // LogicalMaximum(2,147,483,647)
|
|
0x95, 0x05, // ReportCount(5)
|
|
0x75, 0x20, // ReportSize(32)
|
|
0xB1, 0x03, // Feature(Constant, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0xC0, // EndCollection()
|
|
0x85, 0x02, // ReportId(2)
|
|
0x09, 0x20, // UsageId(LampAttributesRequestReport[0x0020])
|
|
0xA1, 0x02, // Collection(Logical)
|
|
0x09, 0x21, // UsageId(LampId[0x0021])
|
|
0x27, 0xFF, 0xFF, 0x00, 0x00, // LogicalMaximum(65,535)
|
|
0x95, 0x01, // ReportCount(1)
|
|
0x75, 0x10, // ReportSize(16)
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0xC0, // EndCollection()
|
|
0x85, 0x03, // ReportId(3)
|
|
0x09, 0x22, // UsageId(LampAttributesResponseReport[0x0022])
|
|
0xA1, 0x02, // Collection(Logical)
|
|
0x09, 0x21, // UsageId(LampId[0x0021])
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0x09, 0x23, // UsageId(PositionXInMicrometers[0x0023])
|
|
0x09, 0x24, // UsageId(PositionYInMicrometers[0x0024])
|
|
0x09, 0x25, // UsageId(PositionZInMicrometers[0x0025])
|
|
0x09, 0x27, // UsageId(UpdateLatencyInMicroseconds[0x0027])
|
|
0x09, 0x26, // UsageId(LampPurposes[0x0026])
|
|
0x27, 0xFF, 0xFF, 0xFF, 0x7F, // LogicalMaximum(2,147,483,647)
|
|
0x95, 0x05, // ReportCount(5)
|
|
0x75, 0x20, // ReportSize(32)
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0x09, 0x28, // UsageId(RedLevelCount[0x0028])
|
|
0x09, 0x29, // UsageId(GreenLevelCount[0x0029])
|
|
0x09, 0x2A, // UsageId(BlueLevelCount[0x002A])
|
|
0x09, 0x2B, // UsageId(IntensityLevelCount[0x002B])
|
|
0x09, 0x2C, // UsageId(IsProgrammable[0x002C])
|
|
0x09, 0x2D, // UsageId(InputBinding[0x002D])
|
|
0x26, 0xFF, 0x00, // LogicalMaximum(255)
|
|
0x95, 0x06, // ReportCount(6)
|
|
0x75, 0x08, // ReportSize(8)
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0xC0, // EndCollection()
|
|
0x85, 0x04, // ReportId(4)
|
|
0x09, 0x50, // UsageId(LampMultiUpdateReport[0x0050])
|
|
0xA1, 0x02, // Collection(Logical)
|
|
0x09, 0x03, // UsageId(LampCount[0x0003])
|
|
0x25, 0x08, // LogicalMaximum(8)
|
|
0x95, 0x01, // ReportCount(1)
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0x09, 0x55, // UsageId(LampUpdateFlags[0x0055])
|
|
0x25, 0x01, // LogicalMaximum(1)
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0x09, 0x21, // UsageId(LampId[0x0021])
|
|
0x27, 0xFF, 0xFF, 0x00, 0x00, // LogicalMaximum(65,535)
|
|
0x95, 0x08, // ReportCount(8)
|
|
0x75, 0x10, // ReportSize(16)
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0x09, 0x51, // UsageId(RedUpdateChannel[0x0051])
|
|
0x09, 0x52, // UsageId(GreenUpdateChannel[0x0052])
|
|
0x09, 0x53, // UsageId(BlueUpdateChannel[0x0053])
|
|
0x09, 0x54, // UsageId(IntensityUpdateChannel[0x0054])
|
|
0x09, 0x51, // UsageId(RedUpdateChannel[0x0051])
|
|
0x09, 0x52, // UsageId(GreenUpdateChannel[0x0052])
|
|
0x09, 0x53, // UsageId(BlueUpdateChannel[0x0053])
|
|
0x09, 0x54, // UsageId(IntensityUpdateChannel[0x0054])
|
|
0x09, 0x51, // UsageId(RedUpdateChannel[0x0051])
|
|
0x09, 0x52, // UsageId(GreenUpdateChannel[0x0052])
|
|
0x09, 0x53, // UsageId(BlueUpdateChannel[0x0053])
|
|
0x09, 0x54, // UsageId(IntensityUpdateChannel[0x0054])
|
|
0x09, 0x51, // UsageId(RedUpdateChannel[0x0051])
|
|
0x09, 0x52, // UsageId(GreenUpdateChannel[0x0052])
|
|
0x09, 0x53, // UsageId(BlueUpdateChannel[0x0053])
|
|
0x09, 0x54, // UsageId(IntensityUpdateChannel[0x0054])
|
|
0x09, 0x51, // UsageId(RedUpdateChannel[0x0051])
|
|
0x09, 0x52, // UsageId(GreenUpdateChannel[0x0052])
|
|
0x09, 0x53, // UsageId(BlueUpdateChannel[0x0053])
|
|
0x09, 0x54, // UsageId(IntensityUpdateChannel[0x0054])
|
|
0x09, 0x51, // UsageId(RedUpdateChannel[0x0051])
|
|
0x09, 0x52, // UsageId(GreenUpdateChannel[0x0052])
|
|
0x09, 0x53, // UsageId(BlueUpdateChannel[0x0053])
|
|
0x09, 0x54, // UsageId(IntensityUpdateChannel[0x0054])
|
|
0x09, 0x51, // UsageId(RedUpdateChannel[0x0051])
|
|
0x09, 0x52, // UsageId(GreenUpdateChannel[0x0052])
|
|
0x09, 0x53, // UsageId(BlueUpdateChannel[0x0053])
|
|
0x09, 0x54, // UsageId(IntensityUpdateChannel[0x0054])
|
|
0x09, 0x51, // UsageId(RedUpdateChannel[0x0051])
|
|
0x09, 0x52, // UsageId(GreenUpdateChannel[0x0052])
|
|
0x09, 0x53, // UsageId(BlueUpdateChannel[0x0053])
|
|
0x09, 0x54, // UsageId(IntensityUpdateChannel[0x0054])
|
|
0x26, 0xFF, 0x00, // LogicalMaximum(255)
|
|
0x95, 0x20, // ReportCount(32)
|
|
0x75, 0x08, // ReportSize(8)
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0xC0, // EndCollection()
|
|
0x85, 0x05, // ReportId(5)
|
|
0x09, 0x60, // UsageId(LampRangeUpdateReport[0x0060])
|
|
0xA1, 0x02, // Collection(Logical)
|
|
0x09, 0x55, // UsageId(LampUpdateFlags[0x0055])
|
|
0x25, 0x01, // LogicalMaximum(1)
|
|
0x95, 0x01, // ReportCount(1)
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0x09, 0x61, // UsageId(LampIdStart[0x0061])
|
|
0x09, 0x62, // UsageId(LampIdEnd[0x0062])
|
|
0x27, 0xFF, 0xFF, 0x00, 0x00, // LogicalMaximum(65,535)
|
|
0x95, 0x02, // ReportCount(2)
|
|
0x75, 0x10, // ReportSize(16)
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0x09, 0x51, // UsageId(RedUpdateChannel[0x0051])
|
|
0x09, 0x52, // UsageId(GreenUpdateChannel[0x0052])
|
|
0x09, 0x53, // UsageId(BlueUpdateChannel[0x0053])
|
|
0x09, 0x54, // UsageId(IntensityUpdateChannel[0x0054])
|
|
0x26, 0xFF, 0x00, // LogicalMaximum(255)
|
|
0x95, 0x04, // ReportCount(4)
|
|
0x75, 0x08, // ReportSize(8)
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0xC0, // EndCollection()
|
|
0x85, 0x06, // ReportId(6)
|
|
0x09, 0x70, // UsageId(LampArrayControlReport[0x0070])
|
|
0xA1, 0x02, // Collection(Logical)
|
|
0x09, 0x71, // UsageId(AutonomousMode[0x0071])
|
|
0x25, 0x01, // LogicalMaximum(1)
|
|
0x95, 0x01, // ReportCount(1)
|
|
0xB1, 0x02, // Feature(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField)
|
|
0xC0, // EndCollection()
|
|
0xC0, // EndCollection()
|
|
};
|
|
|
|
#pragma pack(push,1)
|
|
|
|
#define HID_REPORT_FEATURE1_ID (1)
|
|
struct HidReportFeature1
|
|
{
|
|
uint8_t ReportId = HID_REPORT_FEATURE1_ID;
|
|
uint16_t LampCount;
|
|
uint32_t BoundingBoxWidthInMicrometers;
|
|
uint32_t BoundingBoxHeightInMicrometers;
|
|
uint32_t BoundingBoxDepthInMicrometers;
|
|
uint32_t LampArrayKind;
|
|
uint32_t MinUpdateIntervalInMicroseconds;
|
|
};
|
|
|
|
#define HID_REPORT_FEATURE2_ID (2)
|
|
struct HidReportFeature2
|
|
{
|
|
uint8_t ReportId = HID_REPORT_FEATURE2_ID;
|
|
uint16_t LampId;
|
|
};
|
|
|
|
#define HID_REPORT_FEATURE3_ID (3)
|
|
struct HidReportFeature3
|
|
{
|
|
uint8_t ReportId = HID_REPORT_FEATURE3_ID;
|
|
uint16_t LampId;
|
|
uint32_t PositionXInMicrometers;
|
|
uint32_t PositionYInMicrometers;
|
|
uint32_t PositionZInMicrometers;
|
|
uint32_t UpdateLatencyInMicroseconds;
|
|
uint32_t LampPurposes;
|
|
uint8_t RedLevelCount;
|
|
uint8_t GreenLevelCount;
|
|
uint8_t BlueLevelCount;
|
|
uint8_t IntensityLevelCount;
|
|
uint8_t IsProgrammable;
|
|
uint8_t InputBinding;
|
|
};
|
|
|
|
#define HID_REPORT_FEATURE4_ID (4)
|
|
struct HidReportFeature4
|
|
{
|
|
uint8_t ReportId = HID_REPORT_FEATURE4_ID;
|
|
uint8_t LampCount;
|
|
uint8_t LampUpdateFlagsButton;
|
|
uint16_t LampIds[8];
|
|
uint8_t RedUpdateChannel;
|
|
uint8_t GreenUpdateChannel;
|
|
uint8_t BlueUpdateChannel;
|
|
uint8_t IntensityUpdateChannel;
|
|
uint8_t RedUpdateChannel1;
|
|
uint8_t GreenUpdateChannel1;
|
|
uint8_t BlueUpdateChannel1;
|
|
uint8_t IntensityUpdateChannel1;
|
|
uint8_t RedUpdateChannel2;
|
|
uint8_t GreenUpdateChannel2;
|
|
uint8_t BlueUpdateChannel2;
|
|
uint8_t IntensityUpdateChannel2;
|
|
uint8_t RedUpdateChannel3;
|
|
uint8_t GreenUpdateChannel3;
|
|
uint8_t BlueUpdateChannel3;
|
|
uint8_t IntensityUpdateChannel3;
|
|
uint8_t RedUpdateChannel4;
|
|
uint8_t GreenUpdateChannel4;
|
|
uint8_t BlueUpdateChannel4;
|
|
uint8_t IntensityUpdateChannel4;
|
|
uint8_t RedUpdateChannel5;
|
|
uint8_t GreenUpdateChannel5;
|
|
uint8_t BlueUpdateChannel5;
|
|
uint8_t IntensityUpdateChannel5;
|
|
uint8_t RedUpdateChannel6;
|
|
uint8_t GreenUpdateChannel6;
|
|
uint8_t BlueUpdateChannel6;
|
|
uint8_t IntensityUpdateChannel6;
|
|
uint8_t RedUpdateChannel7;
|
|
uint8_t GreenUpdateChannel7;
|
|
uint8_t BlueUpdateChannel7;
|
|
uint8_t IntensityUpdateChannel7;
|
|
};
|
|
|
|
#define HID_REPORT_FEATURE5_ID (5)
|
|
struct HidReportFeature5
|
|
{
|
|
uint8_t ReportId = HID_REPORT_FEATURE5_ID;
|
|
uint8_t LampUpdateFlagsButton;
|
|
uint16_t LampIdStart;
|
|
uint16_t LampIdEnd;
|
|
uint8_t RedUpdateChannel;
|
|
uint8_t GreenUpdateChannel;
|
|
uint8_t BlueUpdateChannel;
|
|
uint8_t IntensityUpdateChannel;
|
|
};
|
|
|
|
#define HID_REPORT_FEATURE6_ID (6)
|
|
struct HidReportFeature6
|
|
{
|
|
uint8_t ReportId = HID_REPORT_FEATURE6_ID;
|
|
uint8_t AutonomousModeButton;
|
|
};
|
|
|
|
#pragma pack(pop) |