【发布时间】:2019-09-14 07:09:56
【问题描述】:
我正在尝试解码连接到 Linux 计算机时从 /dev/hidraw2 读取的多点触控屏幕的 HID RAW 数据流。
我已经有我的多点触控屏幕的 HID 报告描述符和来自我的屏幕的 64 字节流。 1 finger touch 到目前为止,我可以理解 02 - 报告 id / 04 - 07 如果按下或未按下 / xx - 我不知道 // xx xx 坐标//yy yy 坐标。但它必须是一种读取隐藏描述符并将其转换为我得到的数据流的方法。
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (Touchscreen), ; Touch screen (04h, application collection)
Collection (Application),
Report ID (2),
Usage (Finger), ; Finger (22h, logical collection)
Collection (Logical),
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (Tip Switch), ; Tip switch (42h, momentary control)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (1),
Input (Variable),
Usage (In Range), ; In range (32h, momentary control)
Input (Variable),
Usage (47h),
Input (Variable),
Report Count (5),
Input (Constant, Variable),
Report Size (8),
Usage (51h),
Report Count (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Logical Minimum (0),
Logical Maximum (32767),
Report Size (16),
Usage (X), ; X (30h, dynamic value)
Input (Variable),
Usage (Y), ; Y (31h, dynamic value)
Input (Variable),
End Collection,
Collection (Logical),
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (Tip Switch), ; Tip switch (42h, momentary control)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (1),
Input (Variable),
Usage (In Range), ; In range (32h, momentary control)
Input (Variable),
Usage (47h),
Input (Variable),
Report Count (5),
Input (Constant, Variable),
Report Size (8),
Usage (51h),
Report Count (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Logical Minimum (0),
Logical Maximum (32767),
Report Size (16),
Usage (X), ; X (30h, dynamic value)
Input (Variable),
Usage (Y), ; Y (31h, dynamic value)
Input (Variable),
End Collection,
Collection (Logical),
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (Tip Switch), ; Tip switch (42h, momentary control)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (1),
Input (Variable),
Usage (In Range), ; In range (32h, momentary control)
Input (Variable),
Usage (47h),
Input (Variable),
Report Count (5),
Input (Constant, Variable),
Report Size (8),
Usage (51h),
Report Count (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Logical Minimum (0),
Logical Maximum (32767),
Report Size (16),
Usage (X), ; X (30h, dynamic value)
Input (Variable),
Usage (Y), ; Y (31h, dynamic value)
Input (Variable),
End Collection,
Collection (Logical),
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (Tip Switch), ; Tip switch (42h, momentary control)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (1),
Input (Variable),
Usage (In Range), ; In range (32h, momentary control)
Input (Variable),
Usage (47h),
Input (Variable),
Report Count (5),
Input (Constant, Variable),
Report Size (8),
Usage (51h),
Report Count (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Logical Minimum (0),
Logical Maximum (32767),
Report Size (16),
Usage (X), ; X (30h, dynamic value)
Input (Variable),
Usage (Y), ; Y (31h, dynamic value)
Input (Variable),
End Collection,
Collection (Logical),
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (Tip Switch), ; Tip switch (42h, momentary control)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (1),
Input (Variable),
Usage (In Range), ; In range (32h, momentary control)
Input (Variable),
Usage (47h),
Input (Variable),
Report Count (5),
Input (Constant, Variable),
Report Size (8),
Usage (51h),
Report Count (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Logical Minimum (0),
Logical Maximum (32767),
Report Size (16),
Usage (X), ; X (30h, dynamic value)
Input (Variable),
Usage (Y), ; Y (31h, dynamic value)
Input (Variable),
End Collection,
Collection (Logical),
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (Tip Switch), ; Tip switch (42h, momentary control)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (1),
Input (Variable),
Usage (In Range), ; In range (32h, momentary control)
Input (Variable),
Usage (47h),
Input (Variable),
Report Count (5),
Input (Constant, Variable),
Report Size (8),
Usage (51h),
Report Count (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Logical Minimum (0),
Logical Maximum (32767),
Report Size (16),
Usage (X), ; X (30h, dynamic value)
Input (Variable),
Usage (Y), ; Y (31h, dynamic value)
Input (Variable),
End Collection,
Collection (Logical),
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (Tip Switch), ; Tip switch (42h, momentary control)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (1),
Input (Variable),
Usage (In Range), ; In range (32h, momentary control)
Input (Variable),
Usage (47h),
Input (Variable),
Report Count (5),
Input (Constant, Variable),
Report Size (8),
Usage (51h),
Report Count (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Logical Minimum (0),
Logical Maximum (32767),
Report Size (16),
Usage (X), ; X (30h, dynamic value)
Input (Variable),
Usage (Y), ; Y (31h, dynamic value)
Input (Variable),
End Collection,
Collection (Logical),
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (Tip Switch), ; Tip switch (42h, momentary control)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (1),
Input (Variable),
Usage (In Range), ; In range (32h, momentary control)
Input (Variable),
Usage (47h),
Input (Variable),
Report Count (5),
Input (Constant, Variable),
Report Size (8),
Usage (51h),
Report Count (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Logical Minimum (0),
Logical Maximum (32767),
Report Size (16),
Usage (X), ; X (30h, dynamic value)
Input (Variable),
Usage (Y), ; Y (31h, dynamic value)
Input (Variable),
End Collection,
Collection (Logical),
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (Tip Switch), ; Tip switch (42h, momentary control)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (1),
Input (Variable),
Usage (In Range), ; In range (32h, momentary control)
Input (Variable),
Usage (47h),
Input (Variable),
Report Count (5),
Input (Constant, Variable),
Report Size (8),
Usage (51h),
Report Count (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Logical Minimum (0),
Logical Maximum (32767),
Report Size (16),
Usage (X), ; X (30h, dynamic value)
Input (Variable),
Usage (Y), ; Y (31h, dynamic value)
Input (Variable),
End Collection,
Collection (Logical),
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (Tip Switch), ; Tip switch (42h, momentary control)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (1),
Input (Variable),
Usage (In Range), ; In range (32h, momentary control)
Input (Variable),
Usage (47h),
Input (Variable),
Report Count (5),
Input (Constant, Variable),
Report Size (8),
Usage (51h),
Report Count (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Logical Minimum (0),
Logical Maximum (32767),
Report Size (16),
Usage (X), ; X (30h, dynamic value)
Input (Variable),
Usage (Y), ; Y (31h, dynamic value)
Input (Variable),
End Collection,
Usage Page (Digitizer), ; Digitizer (0Dh)
Usage (54h),
Report Count (1),
Report Size (8),
Input (Variable),
Usage (55h),
Logical Maximum (10),
Feature (Variable),
End Collection,
Usage (0Eh),
Collection (Application),
Report ID (4),
Usage (23h),
Collection (Logical),
Usage (52h),
Logical Minimum (0),
Logical Maximum (10),
Report Size (8),
Report Count (1),
Feature (Variable),
End Collection,
End Collection,
Usage Page (FF00h), ; FF00h, vendor-defined
Usage (01h),
Collection (Application),
Report ID (250),
Usage (01h),
Usage Minimum (01h),
Usage Maximum (3Fh),
Logical Minimum (0),
Logical Maximum (-1),
Report Size (8),
Report Count (63),
Input (Variable),
Report ID (18),
Usage (02h),
Usage Minimum (01h),
Usage Maximum (3Fh),
Output (Variable),
Report ID (16),
Usage (03h),
Usage Minimum (01h),
Usage Maximum (3Fh),
Logical Minimum (0),
Logical Maximum (-1),
Report Size (8),
Report Count (7),
Feature (Variable),
End Collection
【问题讨论】:
-
你能发布一个 HID 描述符的十六进制转储吗?
标签: usb hid descriptor