示例报告描述符 (touchpad-sample-report-descriptors)
本主题介绍 Windows 精确式触摸板设备的示例报告描述符和示例描述符摘录。
注意
尽管供应商特定用法可以在报告的任何级别使用,但它们的使用方式必须能够在所有报告方法(即串行、并行和混合)中同等实现。 不遵守本指南也许不会导致 HLK 失败,但可能会导致严重的兼容性问题。
示例报告描述符
下面的示例描述符中指定的所有值和参数都是必需的。
//TOUCH PAD input TLC
0x05, 0x0d, // USAGE_PAGE (Digitizers)
0x09, 0x05, // USAGE (Touch Pad)
0xa1, 0x01, // COLLECTION (Application)
0x85, REPORTID_TOUCHPAD, // REPORT_ID (Touch pad)
0x09, 0x22, // USAGE (Finger)
0xa1, 0x02, // COLLECTION (Logical)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x09, 0x47, // USAGE (Confidence)
0x09, 0x42, // USAGE (Tip switch)
0x95, 0x02, // REPORT_COUNT (2)
0x75, 0x01, // REPORT_SIZE (1)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x02, // REPORT_SIZE (2)
0x25, 0x02, // LOGICAL_MAXIMUM (2)
0x09, 0x51, // USAGE (Contact Identifier)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x04, // REPORT_COUNT (4)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
0x05, 0x01, // USAGE_PAGE (Generic Desk..
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0xff, 0x0f, // LOGICAL_MAXIMUM (4095)
0x75, 0x10, // REPORT_SIZE (16)
0x55, 0x0e, // UNIT_EXPONENT (-2)
0x65, 0x13, // UNIT(Inch,EngLinear)
0x09, 0x30, // USAGE (X)
0x35, 0x00, // PHYSICAL_MINIMUM (0)
0x46, 0x90, 0x01, // PHYSICAL_MAXIMUM (400)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x46, 0x13, 0x01, // PHYSICAL_MAXIMUM (275)
0x09, 0x31, // USAGE (Y)
0x81, 0x02, // INPUT (Data,Var,Abs)
0xc0, // END_COLLECTION
0x55, 0x0C, // UNIT_EXPONENT (-4)
0x66, 0x01, 0x10, // UNIT (Seconds)
0x47, 0xff, 0xff, 0x00, 0x00, // PHYSICAL_MAXIMUM (65535)
0x27, 0xff, 0xff, 0x00, 0x00, // LOGICAL_MAXIMUM (65535)
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0x05, 0x0d, // USAGE_PAGE (Digitizers)
0x09, 0x56, // USAGE (Scan Time)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x09, 0x54, // USAGE (Contact count)
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x08, // REPORT_SIZE (8)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x05, 0x09, // USAGE_PAGE (Button)
0x09, 0x01, // USAGE_(Button 1)
0x09, 0x02, // USAGE_(Button 2)
0x09, 0x03, // USAGE_(Button 3)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x03, // REPORT_COUNT (3)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x95, 0x05, // REPORT_COUNT (5)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
0x05, 0x0d, // USAGE_PAGE (Digitizer)
0x85, REPORTID_MAX_COUNT, // REPORT_ID (Feature)
0x09, 0x55, // USAGE (Contact Count Maximum)
0x09, 0x59, // USAGE (Pad TYpe)
0x75, 0x04, // REPORT_SIZE (4)
0x95, 0x02, // REPORT_COUNT (2)
0x25, 0x0f, // LOGICAL_MAXIMUM (15)
0xb1, 0x02, // FEATURE (Data,Var,Abs)
0x06, 0x00, 0xff, // USAGE_PAGE (Vendor Defined)
0x85, REPORTID_PTPHQA, // REPORT_ID (PTPHQA)
0x09, 0xC5, // USAGE (Vendor Usage 0xC5)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (0xff)
0x75, 0x08, // REPORT_SIZE (8)
0x96, 0x00, 0x01, // REPORT_COUNT (0x100 (256))
0xb1, 0x02, // FEATURE (Data,Var,Abs)
0xc0, // END_COLLECTION
//CONFIG TLC
0x05, 0x0d, // USAGE_PAGE (Digitizer)
0x09, 0x0E, // USAGE (Configuration)
0xa1, 0x01, // COLLECTION (Application)
0x85, REPORTID_FEATURE, // REPORT_ID (Feature)
0x09, 0x22, // USAGE (Finger)
0xa1, 0x02, // COLLECTION (logical)
0x09, 0x52, // USAGE (Input Mode)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x0a, // LOGICAL_MAXIMUM (10)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x01, // REPORT_COUNT (1)
0xb1, 0x02, // FEATURE (Data,Var,Abs
0xc0, // END_COLLECTION
0x09, 0x22, // USAGE (Finger)
0xa1, 0x00, // COLLECTION (physical)
0x85, REPORTID_FUNCTION_SWITCH, // REPORT_ID (Feature)
0x09, 0x57, // USAGE(Surface switch)
0x09, 0x58, // USAGE(Button switch)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x02, // REPORT_COUNT (2)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0xb1, 0x02, // FEATURE (Data,Var,Abs)
0x95, 0x06, // REPORT_COUNT (6)
0xb1, 0x03, // FEATURE (Cnst,Var,Abs)
0xc0, // END_COLLECTION
0xc0, // END_COLLECTION
//MOUSE TLC
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x02, // USAGE (Mouse)
0xa1, 0x01, // COLLECTION (Application)
0x85, REPORTID_MOUSE, // REPORT_ID (Mouse)
0x09, 0x01, // USAGE (Pointer)
0xa1, 0x00, // COLLECTION (Physical)
0x05, 0x09, // USAGE_PAGE (Button)
0x19, 0x01, // USAGE_MINIMUM (Button 1)
0x29, 0x02, // USAGE_MAXIMUM (Button 2)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x02, // REPORT_COUNT (2)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x95, 0x06, // REPORT_COUNT (6)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x30, // USAGE (X)
0x09, 0x31, // USAGE (Y)
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x02, // REPORT_COUNT (2)
0x25, 0x0a, // LOGICAL_MAXIMUM (10)
0x81, 0x06, // INPUT (Data,Var,Rel)
0xc0, // END_COLLECTION
0xc0, //END_COLLECTION
示例报告描述符摘录 -(延迟模式功能报告)
以下摘录来自 Windows 精确式触摸板顶层集合的描述符。 此描述符摘录适用于对延迟模式功能报告的可选(但强烈建议)支持。
0x05, 0x0d, // USAGE_PAGE (Digitizer)
0x85, REPORTID_LATENCY, // REPORT_ID (Latency)
0x09, 0x60, // USAGE (Latency Mode)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x01, // REPORT_COUNT (1)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0xb1, 0x02, // FEATURE (Data,Var,Abs)
0x95, 0x07, // REPORT_COUNT (7)
0xb1, 0x03, // FEATURE (Cnst,Var,Abs)
示例报表描述符摘录 -(Haptic 强度功能报表)
以下摘录来自 Windows 精度触摸板顶层集合的描述符,适用于“haptic 强度功能报表”的可选支持。
0x05, 0x0E, // Usage Page (Haptics)
0x09, 0x01, // Usage (Simple Haptics Controller)
0xA1, 0x02, // Collection (Logical)
0x09, 0x23, // Usage (Intensity)
0x85, CONFIG_PTP_HAPTICS_ID, // Report ID (CONFIG_PTP_HAPTICS_ID)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x64, // Logical Maximum (100)
0x75, 0x08, // Report Size (8)
0x95, 0x01, // Report Count (1)
0xB1, 0x02, // Feature (Data,Var,Abs)
0xC0, // End Collection ()
示例报告描述符摘录 -(按钮按压阈值功能报告)
以下摘录来自 Windows 精确式触摸板顶层集合的描述符,适用于按钮按压阈值功能报表的可选支持。
0x05, 0x0D, // UsagePage(Digitizers[0x000D])
0x85, REPORTID_BUTTONPRESSTHR, // ReportId(REPORTID_BUTTONPRESSTHR)
0x09, 0xB0, // UsageId(Button Press Threshold[0x00B0])
0x35, 0x6E, // PhysicalMinimum(110)
0x46, 0xBE, 0x00, // PhysicalMaximum(190)
0x66, 0x01, 0x01, // Unit('gram', SiLinear, Gram:1)
0x15, 0x01, // LogicalMinimum(1)
0x25, 0x03, // LogicalMaximum(3)
0x75, 0x02, // ReportSize(2)
0xB1, 0x02, // Feature(Data, Variable, Absolute)
0x75, 0x08, // ReportSize(8)
0xB1, 0x03, // Feature(Constant, Variable, Absolute)
示例报告描述符摘录 -(分段设备认证状态功能报告)
以下摘录来自 Windows 精确式触摸板顶层集合的描述符,适用于设备认证状态功能报告的分段版本。 这允许将认证状态 blob 拆分为 8 个 32 字节段,而不是单个 256 字节段。 主机指示希望在 SET FEATURE 中要返回的段编号。 作为响应,设备返回段编号以及 GET FEATURE 中的关联段。
0x06, 0x00, 0xff, // USAGE_PAGE (Vendor Defined)
0x85, REPORTID_PTPHQA, // REPORT_ID (PTPHQA)
0x09, 0xC6, // USAGE (Vendor usage for segment #)
0x25, 0x08, // LOGICAL_MAXIMUM (8)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x01, // REPORT_COUNT (1)
0xb1, 0x02, // FEATURE (Data,Var,Abs)
0x09, 0xC7, // USAGE (Vendor Usage)
0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (0xff)
0x95, 0x20, // REPORT_COUNT (32)
0xb1, 0x02, // FEATURE (Data,Var,Abs)
示例报表描述符摘录 -(PTP 输入报表,其中包含几何支持)
0x85, REPORTID_TOUCHPAD, // REPORT_ID (Touch pad)
0x09, 0x22, // USAGE (Finger)
0xa1, 0x02, // COLLECTION (Logical)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x09, 0x47, // USAGE (Confidence)
0x09, 0x42, // USAGE (Tip switch)
0x95, 0x02, // REPORT_COUNT (2)
0x75, 0x01, // REPORT_SIZE (1)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x02, // REPORT_SIZE (2)
0x25, 0x02, // LOGICAL_MAXIMUM (2)
0x09, 0x51, // USAGE (Contact Identifier)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x04, // REPORT_COUNT (4)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0xff, 0x0f, // LOGICAL_MAXIMUM (4095)
0x75, 0x10, // REPORT_SIZE (16)
0x55, 0x0e, // UNIT_EXPONENT (-2)
0x65, 0x13, // UNIT(Inch,EngLinear)
0x09, 0x30, // USAGE (X)
0x35, 0x00, // PHYSICAL_MINIMUM (0)
0x46, 0x90, 0x01, // PHYSICAL_MAXIMUM (400)
0x95, 0x02, // REPORT_COUNT (2)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x46, 0x13, 0x01, // PHYSICAL_MAXIMUM (275)
0x09, 0x31, // USAGE (Y)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x05, 0x0d, // USAGE_PAGE (Digitizers)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x64, // LOGICAL_MAXIMUM (100)
0x95, 0x02, // REPORT_COUNT (2)
0x09, 0x48, // USAGE (Width)
0x09, 0x49, // USAGE (Height)
0x81, 0x02, // INPUT (Data,Var,Abs)
0xc0, // END_COLLECTION