- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
目前我正在 STM32f4 板上开发 USB 触摸屏 HID 描述符(自定义 HID 描述符)。为此,我为单个联系人标识符(单手指触摸)实现了一个 HID 描述符,它对我有用。但是,我的要求是多点触摸手指。因此,我正在将我的单点触摸 HID 修改为多点触摸 HID。在这种情况下,我为第二个手指添加了一些报告。
这是我的 2 根手指的报告描述符...
0x05, 0x0D, // Usage Page (Digitizer)
0x09, 0x04, // Usage (Touch Screen)
0xA1, 0x01, // Collection (Application)
0x09, 0x55, // Usage (0x55)
0x25, 0x03, // Logical Maximum (3)
0xB1, 0x02, // Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x54, // Usage (0x54)
0x95, 0x01, // Report Count (1)
0x75, 0x08, // Report Size (8)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x09, 0x22, // Usage (Finger)
0xA1, 0x02, // Collection (Logical)
0x09, 0x51, // Usage (0x51)
0x75, 0x08, // Report Size (8)
0x95, 0x01, // Report Count (1)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x09, 0x42, // Usage (Tip Switch)
0x09, 0x32, // Usage (In Range)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x75, 0x01, // Report Size (1)
0x95, 0x02, // Report Count (2)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x95, 0x06, // Report Count (6)
0x81, 0x03, // Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x09, 0x30, // Usage (X)
0x09, 0x31, // Usage (Y)
0x16, 0x00, 0x00, // Logical Minimum (0)
0x26, 0x10, 0x27, // Logical Maximum (10000)
0x36, 0x00, 0x00, // Physical Minimum (0)
0x46, 0x10, 0x27, // Physical Maximum (10000)
0x66, 0x00, 0x00, // Unit (None)
0x75, 0x10, // Report Size (16)
0x95, 0x02, // Report Count (2)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0xC0, // End Collection
0x05, 0x0D, // Usage Page (Digitizer)
0x09, 0x22, // Usage (Finger)
0xA1, 0x02, // Collection (Logical)
0x05, 0x0D, // Usage Page (Digitizer)
0x09, 0x51, // Usage (0x51)
0x75, 0x08, // Report Size (8)
0x95, 0x01, // Report Count (1)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x09, 0x42, // Usage (Tip Switch)
0x09, 0x32, // Usage (In Range)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x75, 0x01, // Report Size (1)
0x95, 0x02, // Report Count (2)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x95, 0x06, // Report Count (6)
0x81, 0x03, // Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x09, 0x30, // Usage (X)
0x09, 0x31, // Usage (Y)
0x16, 0x00, 0x00, // Logical Minimum (0)
0x26, 0x10, 0x27, // Logical Maximum (10000)
0x66, 0x00, 0x00, // Unit (None)
0x75, 0x10, // Report Size (16)
0x95, 0x02, // Report Count (2)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0xC0, // End Collection
0xC0, // End Collection
我正在 Windows 10 touch lapy 中对此进行测试,其中我有 USBlyzer 来分析从板发送到 PC 的数据。
在分析仪中我得到这样的..
在分析中,尽管我发送了不同的数据,但它显示了手指 1,2 的相同数据。
这里我附上我如何发送数据..
my_buff[0] = 0x02; // contact count
my_buff[1] = 0x01; // contact identifier(finger1)
my_buff[2] = 0x03; // tip switch and in range
my_buff[3] = 0x88; // x axis lsb
my_buff[4] = 0x13; // x axis msb
my_buff[5] = 0x88; // y axis lsb
my_buff[6] = 0x13; // y axis msb
my_buff[7] = 0x02; // contact identifier(finger2)
my_buff[8] = 0x03; // tip switch and in range
my_buff[9] = 0x70; // x axis lsb
my_buff[10] = 0x12; // x axis msb
my_buff[11] = 0x70; // y axis lsb
my_buff[12] = 0x12; // y axis msb
USBD_HID_SendReport (&USB_OTG_dev,
my_buff,
13);
在这种情况下,我什至没有得到单点触摸。但是,如果我禁用手指 2 中的 Nib 开关,那么手指 1 触摸就可以工作。
但是,如果我禁用手指 1 尖端开关,并启用手指 2 尖端开关,那么即使我也无法进行单点触摸。
所以,请帮助我哪里出错了。
我不知道问题是由于报告描述符还是其他原因造成的..
谢谢
最佳答案
报告描述符有很多不太正确的地方,可能会混淆主机 HID 解析器(或导致主机操作系统之间的不同行为),因此我建议首先修复这些问题,包括:
现有的报告描述符将被解析为:
//--------------------------------------------------------------------------------
// Decoded Application Collection
//--------------------------------------------------------------------------------
/*
05 0D (GLOBAL) USAGE_PAGE 0x000D Digitizer Device Page
09 04 (LOCAL) USAGE 0x000D0004 Touch Screen (Application Collection)
A1 01 (MAIN) COLLECTION 0x01 Application (Usage=0x000D0004: Page=Digitizer Device Page, Usage=Touch Screen, Type=Application Collection)
09 55 (LOCAL) USAGE 0x000D0055 Contact Count Maximum (Static Value)
25 03 (GLOBAL) LOGICAL_MAXIMUM 0x03 (3)
B1 02 (MAIN) FEATURE 0x00000002 ( fields x bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap <-- Error: REPORT_SIZE is undefined <-- Error: REPORT_COUNT is undefined <-- Error: LOGICAL_MINIMUM is undefined
09 54 (LOCAL) USAGE 0x000D0054 Contact Count (Dynamic Value)
95 01 (GLOBAL) REPORT_COUNT 0x01 (1) Number of fields
75 08 (GLOBAL) REPORT_SIZE 0x08 (8) Number of bits per field
81 02 (MAIN) INPUT 0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap <-- Error: LOGICAL_MINIMUM is undefined
09 22 (LOCAL) USAGE 0x000D0022 Finger (Logical Collection)
A1 02 (MAIN) COLLECTION 0x02 Logical (Usage=0x000D0022: Page=Digitizer Device Page, Usage=Finger, Type=Logical Collection)
09 51 (LOCAL) USAGE 0x000D0051 Contact Identifier (Dynamic Value)
75 08 (GLOBAL) REPORT_SIZE 0x08 (8) Number of bits per field <-- Redundant: REPORT_SIZE is already 8
95 01 (GLOBAL) REPORT_COUNT 0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1
81 02 (MAIN) INPUT 0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap <-- Error: LOGICAL_MINIMUM is undefined
09 42 (LOCAL) USAGE 0x000D0042 Tip Switch (Momentary Control)
09 32 (LOCAL) USAGE 0x000D0032 In Range (Momentary Control)
15 00 (GLOBAL) LOGICAL_MINIMUM 0x00 (0) <-- Info: Consider replacing 15 00 with 14
25 01 (GLOBAL) LOGICAL_MAXIMUM 0x01 (1)
75 01 (GLOBAL) REPORT_SIZE 0x01 (1) Number of bits per field
95 02 (GLOBAL) REPORT_COUNT 0x02 (2) Number of fields
81 02 (MAIN) INPUT 0x00000002 (2 fields x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
95 06 (GLOBAL) REPORT_COUNT 0x06 (6) Number of fields
81 03 (MAIN) INPUT 0x00000003 (6 fields x 1 bit) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
05 01 (GLOBAL) USAGE_PAGE 0x0001 Generic Desktop Page
09 30 (LOCAL) USAGE 0x00010030 X (Dynamic Value)
09 31 (LOCAL) USAGE 0x00010031 Y (Dynamic Value)
16 0000 (GLOBAL) LOGICAL_MINIMUM 0x0000 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 16 0000 with 14
26 1027 (GLOBAL) LOGICAL_MAXIMUM 0x2710 (10000)
36 0000 (GLOBAL) PHYSICAL_MINIMUM 0x0000 (0) <-- Info: Consider replacing 36 0000 with 34
46 1027 (GLOBAL) PHYSICAL_MAXIMUM 0x2710 (10000)
66 0000 (GLOBAL) UNIT 0x0000 No unit (0=None) <-- Redundant: UNIT is already 0x00000000 <-- Info: Consider replacing 66 0000 with 64
75 10 (GLOBAL) REPORT_SIZE 0x10 (16) Number of bits per field
95 02 (GLOBAL) REPORT_COUNT 0x02 (2) Number of fields
81 02 (MAIN) INPUT 0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
C0 (MAIN) END_COLLECTION Logical <-- Warning: Physical units are still in effect PHYSICAL(MIN=0,MAX=10000) UNIT(0x,EXP=0)
05 0D (GLOBAL) USAGE_PAGE 0x000D Digitizer Device Page
09 22 (LOCAL) USAGE 0x000D0022 Finger (Logical Collection)
A1 02 (MAIN) COLLECTION 0x02 Logical (Usage=0x000D0022: Page=Digitizer Device Page, Usage=Finger, Type=Logical Collection)
05 0D (GLOBAL) USAGE_PAGE 0x000D Digitizer Device Page <-- Redundant: USAGE_PAGE is already 0x000D
09 51 (LOCAL) USAGE 0x000D0051 Contact Identifier (Dynamic Value)
75 08 (GLOBAL) REPORT_SIZE 0x08 (8) Number of bits per field
95 01 (GLOBAL) REPORT_COUNT 0x01 (1) Number of fields
81 02 (MAIN) INPUT 0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap <-- Error: REPORT_SIZE (8) is too small for LOGICAL_MAXIMUM (10000) which needs 14 bits.
09 42 (LOCAL) USAGE 0x000D0042 Tip Switch (Momentary Control)
09 32 (LOCAL) USAGE 0x000D0032 In Range (Momentary Control)
15 00 (GLOBAL) LOGICAL_MINIMUM 0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 01 (GLOBAL) LOGICAL_MAXIMUM 0x01 (1)
75 01 (GLOBAL) REPORT_SIZE 0x01 (1) Number of bits per field
95 02 (GLOBAL) REPORT_COUNT 0x02 (2) Number of fields
81 02 (MAIN) INPUT 0x00000002 (2 fields x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
95 06 (GLOBAL) REPORT_COUNT 0x06 (6) Number of fields
81 03 (MAIN) INPUT 0x00000003 (6 fields x 1 bit) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
05 01 (GLOBAL) USAGE_PAGE 0x0001 Generic Desktop Page
09 30 (LOCAL) USAGE 0x00010030 X (Dynamic Value)
09 31 (LOCAL) USAGE 0x00010031 Y (Dynamic Value)
16 0000 (GLOBAL) LOGICAL_MINIMUM 0x0000 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 16 0000 with 14
26 1027 (GLOBAL) LOGICAL_MAXIMUM 0x2710 (10000)
66 0000 (GLOBAL) UNIT 0x0000 No unit (0=None) <-- Redundant: UNIT is already 0x00000000 <-- Info: Consider replacing 66 0000 with 64
75 10 (GLOBAL) REPORT_SIZE 0x10 (16) Number of bits per field
95 02 (GLOBAL) REPORT_COUNT 0x02 (2) Number of fields
81 02 (MAIN) INPUT 0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
C0 (MAIN) END_COLLECTION Logical <-- Warning: Physical units are still in effect PHYSICAL(MIN=0,MAX=10000) UNIT(0x,EXP=0)
C0 (MAIN) END_COLLECTION Application <-- Warning: Physical units are still in effect PHYSICAL(MIN=0,MAX=10000) UNIT(0x,EXP=0)
*/
//--------------------------------------------------------------------------------
// Digitizer Device Page featureReport (Device <-> Host)
//--------------------------------------------------------------------------------
typedef struct
{
// No REPORT ID byte
// Collection: TouchScreen
// Usage 0x000D0055 Contact Count Maximum, Value = to 3 <-- Ignored: REPORT_COUNT () is too small
} featureReport_t;
//--------------------------------------------------------------------------------
// Digitizer Device Page inputReport (Device --> Host)
//--------------------------------------------------------------------------------
typedef struct
{
// No REPORT ID byte
// Collection: TouchScreen
int8_t DIG_TouchScreenContactCount; // Usage 0x000D0054: Contact Count, Value = to 3
// Collection: TouchScreen Finger
int8_t DIG_TouchScreenFingerContactIdentifier; // Usage 0x000D0051: Contact Identifier, Value = to 3
uint8_t DIG_TouchScreenFingerTipSwitch : 1; // Usage 0x000D0042: Tip Switch, Value = 0 to 1
uint8_t DIG_TouchScreenFingerInRange : 1; // Usage 0x000D0032: In Range, Value = 0 to 1
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint16_t GD_TouchScreenFingerX; // Usage 0x00010030: X, Value = 0 to 10000, Physical = Value
uint16_t GD_TouchScreenFingerY; // Usage 0x00010031: Y, Value = 0 to 10000, Physical = Value
uint8_t DIG_TouchScreenFingerContactIdentifier_1; // Usage 0x000D0051: Contact Identifier, Value = 0 to 10000, Physical = Value
uint8_t DIG_TouchScreenFingerTipSwitch_1 : 1; // Usage 0x000D0042: Tip Switch, Value = 0 to 1, Physical = Value x 10000
uint8_t DIG_TouchScreenFingerInRange_1 : 1; // Usage 0x000D0032: In Range, Value = 0 to 1, Physical = Value x 10000
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint16_t GD_TouchScreenFingerX_1; // Usage 0x00010030: X, Value = 0 to 10000, Physical = Value
uint16_t GD_TouchScreenFingerY_1; // Usage 0x00010031: Y, Value = 0 to 10000, Physical = Value
} inputReport_t;
这是另一个多点触摸报告描述符(使用报告 ID),可能值得尝试:
//--------------------------------------------------------------------------------
// Decoded Application Collection
//--------------------------------------------------------------------------------
/*
05 0D (GLOBAL) USAGE_PAGE 0x000D Digitizer Device Page
09 04 (LOCAL) USAGE 0x000D0004 Touch Screen (Application Collection)
A1 01 (MAIN) COLLECTION 0x01 Application (Usage=0x000D0004: Page=Digitizer Device Page, Usage=Touch Screen, Type=Application Collection)
85 54 (GLOBAL) REPORT_ID 0x54 (84) 'T'
09 22 (LOCAL) USAGE 0x000D0022 Finger (Logical Collection)
A1 02 (MAIN) COLLECTION 0x02 Logical (Usage=0x000D0022: Page=Digitizer Device Page, Usage=Finger, Type=Logical Collection)
09 42 (LOCAL) USAGE 0x000D0042 Tip Switch (Momentary Control)
14 (GLOBAL) LOGICAL_MINIMUM (0)
25 01 (GLOBAL) LOGICAL_MAXIMUM 0x01 (1)
75 01 (GLOBAL) REPORT_SIZE 0x01 (1) Number of bits per field
95 01 (GLOBAL) REPORT_COUNT 0x01 (1) Number of fields
81 02 (MAIN) INPUT 0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
09 32 (LOCAL) USAGE 0x000D0032 In Range (Momentary Control)
81 02 (MAIN) INPUT 0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
09 47 (LOCAL) USAGE 0x000D0047 Confidence (Dynamic Value)
81 02 (MAIN) INPUT 0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
95 05 (GLOBAL) REPORT_COUNT 0x05 (5) Number of fields
81 03 (MAIN) INPUT 0x00000003 (5 fields x 1 bit) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
75 08 (GLOBAL) REPORT_SIZE 0x08 (8) Number of bits per field
09 51 (LOCAL) USAGE 0x000D0051 Contact Identifier (Dynamic Value)
95 01 (GLOBAL) REPORT_COUNT 0x01 (1) Number of fields
81 02 (MAIN) INPUT 0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
05 01 (GLOBAL) USAGE_PAGE 0x0001 Generic Desktop Page
26 FF7F (GLOBAL) LOGICAL_MAXIMUM 0x7FFF (32767)
75 10 (GLOBAL) REPORT_SIZE 0x10 (16) Number of bits per field
09 30 (LOCAL) USAGE 0x00010030 X (Dynamic Value)
81 02 (MAIN) INPUT 0x00000002 (1 field x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
09 31 (LOCAL) USAGE 0x00010031 Y (Dynamic Value)
81 02 (MAIN) INPUT 0x00000002 (1 field x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
C0 (MAIN) END_COLLECTION Logical
05 0D (GLOBAL) USAGE_PAGE 0x000D Digitizer Device Page
09 22 (LOCAL) USAGE 0x000D0022 Finger (Logical Collection)
A1 02 (MAIN) COLLECTION 0x02 Logical (Usage=0x000D0022: Page=Digitizer Device Page, Usage=Finger, Type=Logical Collection)
09 42 (LOCAL) USAGE 0x000D0042 Tip Switch (Momentary Control)
25 01 (GLOBAL) LOGICAL_MAXIMUM 0x01 (1)
75 01 (GLOBAL) REPORT_SIZE 0x01 (1) Number of bits per field
81 02 (MAIN) INPUT 0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
09 32 (LOCAL) USAGE 0x000D0032 In Range (Momentary Control)
81 02 (MAIN) INPUT 0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
09 47 (LOCAL) USAGE 0x000D0047 Confidence (Dynamic Value)
81 02 (MAIN) INPUT 0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
95 05 (GLOBAL) REPORT_COUNT 0x05 (5) Number of fields
81 03 (MAIN) INPUT 0x00000003 (5 fields x 1 bit) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
75 08 (GLOBAL) REPORT_SIZE 0x08 (8) Number of bits per field
95 01 (GLOBAL) REPORT_COUNT 0x01 (1) Number of fields
09 51 (LOCAL) USAGE 0x000D0051 Contact Identifier (Dynamic Value)
81 02 (MAIN) INPUT 0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
05 01 (GLOBAL) USAGE_PAGE 0x0001 Generic Desktop Page
26 FF7F (GLOBAL) LOGICAL_MAXIMUM 0x7FFF (32767)
75 10 (GLOBAL) REPORT_SIZE 0x10 (16) Number of bits per field
09 30 (LOCAL) USAGE 0x00010030 X (Dynamic Value)
81 02 (MAIN) INPUT 0x00000002 (1 field x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
09 31 (LOCAL) USAGE 0x00010031 Y (Dynamic Value)
81 02 (MAIN) INPUT 0x00000002 (1 field x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
C0 (MAIN) END_COLLECTION Logical
05 0D (GLOBAL) USAGE_PAGE 0x000D Digitizer Device Page
09 54 (LOCAL) USAGE 0x000D0054 Contact Count (Dynamic Value)
75 08 (GLOBAL) REPORT_SIZE 0x08 (8) Number of bits per field
25 08 (GLOBAL) LOGICAL_MAXIMUM 0x08 (8)
81 02 (MAIN) INPUT 0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
09 55 (LOCAL) USAGE 0x000D0055 Contact Count Maximum (Static Value)
B1 02 (MAIN) FEATURE 0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap
C0 (MAIN) END_COLLECTION Application
*/
//--------------------------------------------------------------------------------
// Digitizer Device Page featureReport 54 (Device <-> Host)
//--------------------------------------------------------------------------------
typedef struct
{
uint8_t reportId; // Report ID = 0x54 (84) 'T'
// Collection: TouchScreen
uint8_t DIG_TouchScreenContactCountMaximum; // Usage 0x000D0055: Contact Count Maximum, Value = 0 to 8
} featureReport54_t;
//--------------------------------------------------------------------------------
// Digitizer Device Page inputReport 54 (Device --> Host)
//--------------------------------------------------------------------------------
typedef struct
{
uint8_t reportId; // Report ID = 0x54 (84) 'T'
// Collection: TouchScreen Finger
uint8_t DIG_TouchScreenFingerTipSwitch : 1; // Usage 0x000D0042: Tip Switch, Value = 0 to 1
uint8_t DIG_TouchScreenFingerInRange : 1; // Usage 0x000D0032: In Range, Value = 0 to 1
uint8_t DIG_TouchScreenFingerConfidence : 1; // Usage 0x000D0047: Confidence, Value = 0 to 1
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t DIG_TouchScreenFingerContactIdentifier; // Usage 0x000D0051: Contact Identifier, Value = 0 to 1
uint16_t GD_TouchScreenFingerX; // Usage 0x00010030: X, Value = 0 to 32767
uint16_t GD_TouchScreenFingerY; // Usage 0x00010031: Y, Value = 0 to 32767
uint8_t DIG_TouchScreenFingerTipSwitch_1 : 1; // Usage 0x000D0042: Tip Switch, Value = 0 to 1
uint8_t DIG_TouchScreenFingerInRange_1 : 1; // Usage 0x000D0032: In Range, Value = 0 to 1
uint8_t DIG_TouchScreenFingerConfidence_1 : 1; // Usage 0x000D0047: Confidence, Value = 0 to 1
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t : 1; // Pad
uint8_t DIG_TouchScreenFingerContactIdentifier_1; // Usage 0x000D0051: Contact Identifier, Value = 0 to 1
uint16_t GD_TouchScreenFingerX_1; // Usage 0x00010030: X, Value = 0 to 32767
uint16_t GD_TouchScreenFingerY_1; // Usage 0x00010031: Y, Value = 0 to 32767
// Collection: TouchScreen
uint8_t DIG_TouchScreenContactCount; // Usage 0x000D0054: Contact Count, Value = 0 to 8
} inputReport54_t;
关于c - 用于 2 个联系人标识符的 USB 触摸屏 HID 描述符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51191660/
C++ Primer 说: The identifier we define in our programs may not contain 2 consecutive underscores, no
标识符术语在文档 alongside constants 中定义。 , 使用几乎相同的用例,尽管术语在运行时计算它们的值,而常量在编译时得到它。潜在地,这可能会使术语使用全局变量,但这是一个遥远而丑陋
我想知道,.Net 标识符中接受哪些字符? 不是 C# 或 VB.Net,而是 CLR。 我问这个的原因是我正在查看 yield return 语句是如何实现的 (C# In Depth),并看到
在PowerShell中,当我专门使用Active Directory时,通常会编译一个包含一组人群列表的对象,通常使用$x = get-adgroup -filter {name -like "*"
使用 hibernate 时: 我必须为每个实体指定一个 ID 或复合 ID,如果我想使用没有任何主键且没有复合键的表怎么办... 提前致谢 最佳答案 没有键的表不是一个好的关系模型。我不会推荐它。
所以我有一些代码正在尝试编译,但我不断收到此错误: 3SATSolver.java:3: expected 这是代码。我只是没有看到什么吗? import java.util.ArrayList;
我正在寻找有关 C 标准(C99 和/或 C11)部分内容的一些说明,主要是关于标识符的使用。 上下文是一个完整的C99标准库的实现,我希望它完全符合标准。 基本问题是:C 标准允许我在多大程度上声明
我有这个 Shader.h 文件,我正在用这段代码制作它: #include #include #include #include in vec2 TexCoords; out vec4 co
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
这是我的代码: #include "stdafx.h" #include #include #include #include using namespace std; int _tmain(
pthread_create() 的第一个参数是一个thread 对象,用于标识新创建的线程。但是,我不确定我是否完全理解其中的含义。 例如,我正在编写一个简单的聊天服务器并且我计划使用线程。线程会随
我想从我的标识符中获得匹配项。 我在 {/describe:foo} 中有一个这样的字符串,我正在尝试匹配 {/describe:} 以返回 foo,但我没有得到正确的正则表达式,会有人介意指出我做错
我遇到了一个奇怪的问题,我似乎找不到答案,但我想我不妨问问。 我有一个执行碰撞检查的抽象类,它有一个“更新”函数,以及“updateX”和“updateY”函数。 class MapCollidabl
我正在尝试创建一个程序来将所有文件从一个目录复制到另一个目录。但我遇到了一个基本问题。它说当我尝试在第 52 行编译时需要标识符。 public bool RecursiveCopy() {
1>cb.c(51): error C2061: syntax error : identifier 'SaveConfiguration' 1>cb.c(51): error C2059: synt
我刚刚发现命名变量 arguments 是个坏主意。 var arguments = 5; (function () { console.log(arguments); })(); Outpu
我们对我们的网站进行了安全测试,并发现了一个漏洞。 问题 If the session identifier were known by an attacker who had access to t
为了估计程序在一次内核启动中可以处理多少数据,我尝试使用 cudaMemGetInfo() 获取一些内存信息。但是,编译器告诉我: 错误:标识符“cudaMemGetInfo”未定义 cudaGetD
我发现我需要使用 xpath 查询来定位几乎是 regexp 类型的字符串,但无法看到如何管理它。我正在使用的当前查询是: $result = $xpath->query('//ul/li[sta
我正在创建我的学生计划表的虚拟版本,它基本上可以让你记下你有哪些科目的作业。 这是界面: 用户从组合框中选择主题,并在相邻的备忘录中输入一些注释。完成后,他们将单击“保存”按钮,将其保存到 .ini
我是一名优秀的程序员,十分优秀!