Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/162.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 报表描述符和报表数据结构不正确?_C++_C_Windows_Device Driver_Hid - Fatal编程技术网

C++ 报表描述符和报表数据结构不正确?

C++ 报表描述符和报表数据结构不正确?,c++,c,windows,device-driver,hid,C++,C,Windows,Device Driver,Hid,我正在通过修改此处的示例代码来使用HID报告描述符: (该链接打开queue.cpp文件,该文件是驱动程序的大部分读/写代码所在的位置,也是默认的hid报告描述符)。到目前为止,我的驱动程序中的更新报告描述符为(截至2015年5月11日): 我的问题有四个方面: 我需要将4个鼠标设备的控制集合(到达鼠标设备开始注释之前的第一个集合)的数据向下传递到鼠标集合中。我该如何编写一个报告描述符来实现这一点,还是需要代码来实现这一点 我的报表结构代码如何从Windows.Devices.HumanInte

我正在通过修改此处的示例代码来使用HID报告描述符: (该链接打开queue.cpp文件,该文件是驱动程序的大部分读/写代码所在的位置,也是默认的hid报告描述符)。到目前为止,我的驱动程序中的更新报告描述符为(截至2015年5月11日):

我的问题有四个方面:

  • 我需要将4个鼠标设备的控制集合(到达鼠标设备开始注释之前的第一个集合)的数据向下传递到鼠标集合中。我该如何编写一个报告描述符来实现这一点,还是需要代码来实现这一点

  • 我的报表结构代码如何从Windows.Devices.HumanInterfaceDevice读取/写入控件结构

  • 我是否应该像vmulti一样发送每个报表描述符,但“全部在一个循环中”除外

  • 如果我想为多点鼠标SDK或另一个多鼠标应用程序模拟/仿真鼠标设备,那么上面有多少内容是必需的?(向多鼠标应用程序发送输入)
  • 注意:我计划使用类函数来读/写上面定义的4个鼠标设备,这就是为什么我要费尽心机去弄清楚这些东西。但是msdn上的类明确指出我不能直接向鼠标设备写入数据。如果是这样,我就不会在这里写作了如果出现问题:是的,这是关于将输入注入到鼠标集合中,以便让它们使用多鼠标应用程序。上面指向WudfVhidmin示例的链接不是我的代码,而是我用来编写驱动程序的示例


    如果我在第一个结束集合注释之前取出该部分,它将创建三个鼠标设备,但仅此而已。

    听起来您希望定义一个报告描述符以容纳四个物理鼠标指针(至少这是您问题的一部分?)。HID报告描述符规范允许“实例”的概念,因此我认为尝试下面的报告描述符可能值得研究我不知道它在实践中是否有效,但它是基于中“附录a.5控件的多个实例”中的一个(相当脆弱的IMHO)示例

    就我所知,没有办法一次定义一个实例,然后以某种方式生成四个实例。您似乎必须为每个实例复制报告描述符

    无论如何值得一试

    以下代码是我不久前编写的,用来帮助我解码HID报告描述符:

    //--------------------------------------------------------------------------------
    // Decoded Application Collection
    //--------------------------------------------------------------------------------
    
    /*
    06 00FF      (GLOBAL) USAGE_PAGE         0xFF00 Vendor-defined 
    09 01        (LOCAL)  USAGE              0xFF000001  
    A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0xFF000001: Page=Vendor-defined, Usage=, Type=)
    85 0F          (GLOBAL) REPORT_ID          0x0F (15) 
    09 01          (LOCAL)  USAGE              0xFF000001  
    15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0
    26 FF00        (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255) 
    75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field 
    96 0900        (GLOBAL) REPORT_COUNT       0x0009 (9) Number of fields 
    B1 00          (MAIN)   FEATURE            0x00000000 (9 fields x 8 bits) 0=Data 0=Array 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    09 01          (LOCAL)  USAGE              0xFF000001  
    96 0100        (GLOBAL) REPORT_COUNT       0x0001 (1) Number of fields 
    81 00          (MAIN)   INPUT              0x00000000 (1 field x 8 bits) 0=Data 0=Array 0=Absolute 0=Ignored 0=Ignored 0=PrefState 0=NoNull 
    09 01          (LOCAL)  USAGE              0xFF000001  
    96 0700        (GLOBAL) REPORT_COUNT       0x0007 (7) Number of fields 
    91 00          (MAIN)   OUTPUT             0x00000000 (7 fields x 8 bits) 0=Data 0=Array 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    C0           (MAIN)   END_COLLECTION     Application
    */
    
    //--------------------------------------------------------------------------------
    // Decoded Application Collection
    //--------------------------------------------------------------------------------
    
    /*
    05 01        (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
    09 02        (LOCAL)  USAGE              0x00010002 Mouse (CA=Application Collection) 
    A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0x00010002: Page=Generic Desktop Page, Usage=Mouse, Type=CA)
    09 01          (LOCAL)  USAGE              0x00010001 Pointer (CP=Physical Collection) 
    A1 02          (MAIN)   COLLECTION         0x02 Logical (Usage=0x00010001: Page=Generic Desktop Page, Usage=Pointer, Type=CP) <-- Warning: USAGE type should be CL (Logical)
    05 0A            (GLOBAL) USAGE_PAGE         0x000A Ordinal Page 
    09 01            (LOCAL)  USAGE              0x000A0001 Instance 1 (UM=Usage Modifier) 
    85 01            (GLOBAL) REPORT_ID          0x01 (1) 
    A1 00            (MAIN)   COLLECTION         0x00 Physical (Usage=0x000A0001: Page=Ordinal Page, Usage=Instance 1, Type=UM) <-- Warning: USAGE type should be CP (Physical)
    05 09              (GLOBAL) USAGE_PAGE         0x0009 Button Page 
    19 01              (LOCAL)  USAGE_MINIMUM      0x00090001 Button 1 Primary/trigger (MULTI=Selector, On/Off, Momentary, or One Shot) 
    29 03              (LOCAL)  USAGE_MAXIMUM      0x00090003 Button 3 Tertiary (MULTI=Selector, On/Off, Momentary, or One Shot) 
    15 00              (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0
    25 01              (GLOBAL) LOGICAL_MAXIMUM    0x01 (1) 
    75 01              (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field 
    95 03              (GLOBAL) REPORT_COUNT       0x03 (3) Number of fields 
    81 02              (MAIN)   INPUT              0x00000002 (3 fields 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 
    05 01              (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
    09 30              (LOCAL)  USAGE              0x00010030 X (DV=Dynamic Value) 
    09 31              (LOCAL)  USAGE              0x00010031 Y (DV=Dynamic Value) 
    15 81              (GLOBAL) LOGICAL_MINIMUM    0x81 (-127) 
    25 7F              (GLOBAL) LOGICAL_MAXIMUM    0x7F (127) 
    75 08              (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field 
    95 02              (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields 
    81 06              (MAIN)   INPUT              0x00000006 (2 fields x 8 bits) 0=Data 1=Variable 1=Relative 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    C0               (MAIN)   END_COLLECTION     Physical
    05 0A            (GLOBAL) USAGE_PAGE         0x000A Ordinal Page 
    09 02            (LOCAL)  USAGE              0x000A0002 Instance 2 (UM=Usage Modifier) 
    85 02            (GLOBAL) REPORT_ID          0x02 (2) 
    A1 00            (MAIN)   COLLECTION         0x00 Physical (Usage=0x000A0002: Page=Ordinal Page, Usage=Instance 2, Type=UM) <-- Warning: USAGE type should be CP (Physical)
    05 09              (GLOBAL) USAGE_PAGE         0x0009 Button Page 
    19 01              (LOCAL)  USAGE_MINIMUM      0x00090001 Button 1 Primary/trigger (MULTI=Selector, On/Off, Momentary, or One Shot) 
    29 03              (LOCAL)  USAGE_MAXIMUM      0x00090003 Button 3 Tertiary (MULTI=Selector, On/Off, Momentary, or One Shot) 
    15 00              (GLOBAL) LOGICAL_MINIMUM    0x00 (0) 
    25 01              (GLOBAL) LOGICAL_MAXIMUM    0x01 (1) 
    75 01              (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field 
    95 03              (GLOBAL) REPORT_COUNT       0x03 (3) Number of fields 
    81 02              (MAIN)   INPUT              0x00000002 (3 fields 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 
    05 01              (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
    09 30              (LOCAL)  USAGE              0x00010030 X (DV=Dynamic Value) 
    09 31              (LOCAL)  USAGE              0x00010031 Y (DV=Dynamic Value) 
    15 81              (GLOBAL) LOGICAL_MINIMUM    0x81 (-127) 
    25 7F              (GLOBAL) LOGICAL_MAXIMUM    0x7F (127) 
    75 08              (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field 
    95 02              (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields 
    81 06              (MAIN)   INPUT              0x00000006 (2 fields x 8 bits) 0=Data 1=Variable 1=Relative 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    C0               (MAIN)   END_COLLECTION     Physical
    05 0A            (GLOBAL) USAGE_PAGE         0x000A Ordinal Page 
    09 03            (LOCAL)  USAGE              0x000A0003 Instance 3 (UM=Usage Modifier) 
    85 03            (GLOBAL) REPORT_ID          0x03 (3) 
    A1 00            (MAIN)   COLLECTION         0x00 Physical (Usage=0x000A0003: Page=Ordinal Page, Usage=Instance 3, Type=UM) <-- Warning: USAGE type should be CP (Physical)
    05 09              (GLOBAL) USAGE_PAGE         0x0009 Button Page 
    19 01              (LOCAL)  USAGE_MINIMUM      0x00090001 Button 1 Primary/trigger (MULTI=Selector, On/Off, Momentary, or One Shot) 
    29 03              (LOCAL)  USAGE_MAXIMUM      0x00090003 Button 3 Tertiary (MULTI=Selector, On/Off, Momentary, or One Shot) 
    15 00              (GLOBAL) LOGICAL_MINIMUM    0x00 (0) 
    25 01              (GLOBAL) LOGICAL_MAXIMUM    0x01 (1) 
    75 01              (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field 
    95 03              (GLOBAL) REPORT_COUNT       0x03 (3) Number of fields 
    81 02              (MAIN)   INPUT              0x00000002 (3 fields 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 
    05 01              (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
    09 30              (LOCAL)  USAGE              0x00010030 X (DV=Dynamic Value) 
    09 31              (LOCAL)  USAGE              0x00010031 Y (DV=Dynamic Value) 
    15 81              (GLOBAL) LOGICAL_MINIMUM    0x81 (-127) 
    25 7F              (GLOBAL) LOGICAL_MAXIMUM    0x7F (127) 
    75 08              (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field 
    95 02              (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields 
    81 06              (MAIN)   INPUT              0x00000006 (2 fields x 8 bits) 0=Data 1=Variable 1=Relative 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    C0               (MAIN)   END_COLLECTION     Physical
    05 0A            (GLOBAL) USAGE_PAGE         0x000A Ordinal Page 
    09 04            (LOCAL)  USAGE              0x000A0004 Instance 4 (UM=Usage Modifier) 
    85 04            (GLOBAL) REPORT_ID          0x04 (4) 
    A1 00            (MAIN)   COLLECTION         0x00 Physical (Usage=0x000A0004: Page=Ordinal Page, Usage=Instance 4, Type=UM) <-- Warning: USAGE type should be CP (Physical)
    05 09              (GLOBAL) USAGE_PAGE         0x0009 Button Page 
    19 01              (LOCAL)  USAGE_MINIMUM      0x00090001 Button 1 Primary/trigger (MULTI=Selector, On/Off, Momentary, or One Shot) 
    29 03              (LOCAL)  USAGE_MAXIMUM      0x00090003 Button 3 Tertiary (MULTI=Selector, On/Off, Momentary, or One Shot) 
    15 00              (GLOBAL) LOGICAL_MINIMUM    0x00 (0) 
    25 01              (GLOBAL) LOGICAL_MAXIMUM    0x01 (1) 
    75 01              (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field 
    95 03              (GLOBAL) REPORT_COUNT       0x03 (3) Number of fields 
    81 02              (MAIN)   INPUT              0x00000002 (3 fields 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 
    05 01              (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
    09 30              (LOCAL)  USAGE              0x00010030 X (DV=Dynamic Value) 
    09 31              (LOCAL)  USAGE              0x00010031 Y (DV=Dynamic Value) 
    15 81              (GLOBAL) LOGICAL_MINIMUM    0x81 (-127) 
    25 7F              (GLOBAL) LOGICAL_MAXIMUM    0x7F (127) 
    75 08              (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field 
    95 02              (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields 
    81 06              (MAIN)   INPUT              0x00000006 (2 fields x 8 bits) 0=Data 1=Variable 1=Relative 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    C0               (MAIN)   END_COLLECTION     Physical
    C0             (MAIN)   END_COLLECTION     Logical
    C0           (MAIN)   END_COLLECTION     Application
    
    //--------------------------------------------------------------------------------
    //解码应用程序集合
    //--------------------------------------------------------------------------------
    /*
    06 00FF(全球)用途\u第0xFF00页供应商定义
    09 01(本地)使用0xFF000001
    A1 01(主)集合0x01应用程序(用法=0xFF000001:页面=供应商定义,用法=,类型=)
    85 0F(全局)报告\u ID 0x0F(15)
    09 01(本地)使用0xFF000001
    
    15 00(全局)逻辑_最小0x00(0)这里是指向联机源代码的vmulti链接,以查看我在上面所说的内容:这里链接:P.s.这是我正在使用的描述符工具,是一些Microsoft WDK论坛工作人员推荐的:描述符工具。谢谢。我试图创建4个鼠标设备,并为每个设备创建一个控件集合,或者创建一个主控件集合,用于向4个不同的鼠标设备发送数据或从4个不同的鼠标设备发送数据(我需要将输入注入4个较低的鼠标设备)。基本上,我使用windows.devices.humaninterface devices类,该类在内部调用与读取设备相关的其他win32函数,但不直接使用鼠标设备进行读取/写入。注意:我可以成功地将输入发送到控件集合并读取它,但还不能读取鼠标设备。我将对此进行解码,看看哪些有效,哪些无效,然后与您联系。另一个注意:原因是模拟/模拟鼠标设备,但我需要控件集合向下传递数据,因为win32 api不允许这是直接的。我不需要指针,因为我编写的这段代码是为了与多点鼠标SDK和鼠标淘气powerpoint插件结合使用。我只需要驱动程序,因为我计划与另一个设备(Kinect、智能板等)结合使用。你能在我的帖子中列出的第一个链接中添加WriteOutport函数的驱动程序端代码示例吗?(我将使用我在tommorow中的内容进行更新)我正在编写代码,但如果您有一个输出示例,输入报告可能会容易得多。对不起,我不是Windows开发人员。几年前,我对解码微控制器保护的HID报告描述符很感兴趣,那时我才发现它有多么复杂(可怕)。当我完成解码器时,我用官方规范中的所有样本运行它。。。你会惊讶于有多少例子是不可靠的。难怪人们对HID有这么多麻烦。
    typedef struct _HIDMINI_INPUT_REPORT {
    
        UCHAR ReportId;   
    
        UCHAR Data; 
    
    } HIDMINI_INPUT_REPORT, *PHIDMINI_INPUT_REPORT;
    
    //
    // output to device from system
    //
    typedef struct _HIDMINI_OUTPUT_REPORT {
    
        UCHAR ReportId;   
    
        UCHAR Data; 
    
        USHORT Pad1;
    
        ULONG Pad2;
    
    } HIDMINI_OUTPUT_REPORT, *PHIDMINI_OUTPUT_REPORT;
    
    //--------------------------------------------------------------------------------
    // Decoded Application Collection
    //--------------------------------------------------------------------------------
    
    /*
    06 00FF      (GLOBAL) USAGE_PAGE         0xFF00 Vendor-defined 
    09 01        (LOCAL)  USAGE              0xFF000001  
    A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0xFF000001: Page=Vendor-defined, Usage=, Type=)
    85 0F          (GLOBAL) REPORT_ID          0x0F (15) 
    09 01          (LOCAL)  USAGE              0xFF000001  
    15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0
    26 FF00        (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255) 
    75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field 
    96 0900        (GLOBAL) REPORT_COUNT       0x0009 (9) Number of fields 
    B1 00          (MAIN)   FEATURE            0x00000000 (9 fields x 8 bits) 0=Data 0=Array 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    09 01          (LOCAL)  USAGE              0xFF000001  
    96 0100        (GLOBAL) REPORT_COUNT       0x0001 (1) Number of fields 
    81 00          (MAIN)   INPUT              0x00000000 (1 field x 8 bits) 0=Data 0=Array 0=Absolute 0=Ignored 0=Ignored 0=PrefState 0=NoNull 
    09 01          (LOCAL)  USAGE              0xFF000001  
    96 0700        (GLOBAL) REPORT_COUNT       0x0007 (7) Number of fields 
    91 00          (MAIN)   OUTPUT             0x00000000 (7 fields x 8 bits) 0=Data 0=Array 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    C0           (MAIN)   END_COLLECTION     Application
    */
    
    //--------------------------------------------------------------------------------
    // Decoded Application Collection
    //--------------------------------------------------------------------------------
    
    /*
    05 01        (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
    09 02        (LOCAL)  USAGE              0x00010002 Mouse (CA=Application Collection) 
    A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0x00010002: Page=Generic Desktop Page, Usage=Mouse, Type=CA)
    09 01          (LOCAL)  USAGE              0x00010001 Pointer (CP=Physical Collection) 
    A1 02          (MAIN)   COLLECTION         0x02 Logical (Usage=0x00010001: Page=Generic Desktop Page, Usage=Pointer, Type=CP) <-- Warning: USAGE type should be CL (Logical)
    05 0A            (GLOBAL) USAGE_PAGE         0x000A Ordinal Page 
    09 01            (LOCAL)  USAGE              0x000A0001 Instance 1 (UM=Usage Modifier) 
    85 01            (GLOBAL) REPORT_ID          0x01 (1) 
    A1 00            (MAIN)   COLLECTION         0x00 Physical (Usage=0x000A0001: Page=Ordinal Page, Usage=Instance 1, Type=UM) <-- Warning: USAGE type should be CP (Physical)
    05 09              (GLOBAL) USAGE_PAGE         0x0009 Button Page 
    19 01              (LOCAL)  USAGE_MINIMUM      0x00090001 Button 1 Primary/trigger (MULTI=Selector, On/Off, Momentary, or One Shot) 
    29 03              (LOCAL)  USAGE_MAXIMUM      0x00090003 Button 3 Tertiary (MULTI=Selector, On/Off, Momentary, or One Shot) 
    15 00              (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0
    25 01              (GLOBAL) LOGICAL_MAXIMUM    0x01 (1) 
    75 01              (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field 
    95 03              (GLOBAL) REPORT_COUNT       0x03 (3) Number of fields 
    81 02              (MAIN)   INPUT              0x00000002 (3 fields 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 
    05 01              (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
    09 30              (LOCAL)  USAGE              0x00010030 X (DV=Dynamic Value) 
    09 31              (LOCAL)  USAGE              0x00010031 Y (DV=Dynamic Value) 
    15 81              (GLOBAL) LOGICAL_MINIMUM    0x81 (-127) 
    25 7F              (GLOBAL) LOGICAL_MAXIMUM    0x7F (127) 
    75 08              (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field 
    95 02              (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields 
    81 06              (MAIN)   INPUT              0x00000006 (2 fields x 8 bits) 0=Data 1=Variable 1=Relative 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    C0               (MAIN)   END_COLLECTION     Physical
    05 0A            (GLOBAL) USAGE_PAGE         0x000A Ordinal Page 
    09 02            (LOCAL)  USAGE              0x000A0002 Instance 2 (UM=Usage Modifier) 
    85 02            (GLOBAL) REPORT_ID          0x02 (2) 
    A1 00            (MAIN)   COLLECTION         0x00 Physical (Usage=0x000A0002: Page=Ordinal Page, Usage=Instance 2, Type=UM) <-- Warning: USAGE type should be CP (Physical)
    05 09              (GLOBAL) USAGE_PAGE         0x0009 Button Page 
    19 01              (LOCAL)  USAGE_MINIMUM      0x00090001 Button 1 Primary/trigger (MULTI=Selector, On/Off, Momentary, or One Shot) 
    29 03              (LOCAL)  USAGE_MAXIMUM      0x00090003 Button 3 Tertiary (MULTI=Selector, On/Off, Momentary, or One Shot) 
    15 00              (GLOBAL) LOGICAL_MINIMUM    0x00 (0) 
    25 01              (GLOBAL) LOGICAL_MAXIMUM    0x01 (1) 
    75 01              (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field 
    95 03              (GLOBAL) REPORT_COUNT       0x03 (3) Number of fields 
    81 02              (MAIN)   INPUT              0x00000002 (3 fields 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 
    05 01              (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
    09 30              (LOCAL)  USAGE              0x00010030 X (DV=Dynamic Value) 
    09 31              (LOCAL)  USAGE              0x00010031 Y (DV=Dynamic Value) 
    15 81              (GLOBAL) LOGICAL_MINIMUM    0x81 (-127) 
    25 7F              (GLOBAL) LOGICAL_MAXIMUM    0x7F (127) 
    75 08              (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field 
    95 02              (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields 
    81 06              (MAIN)   INPUT              0x00000006 (2 fields x 8 bits) 0=Data 1=Variable 1=Relative 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    C0               (MAIN)   END_COLLECTION     Physical
    05 0A            (GLOBAL) USAGE_PAGE         0x000A Ordinal Page 
    09 03            (LOCAL)  USAGE              0x000A0003 Instance 3 (UM=Usage Modifier) 
    85 03            (GLOBAL) REPORT_ID          0x03 (3) 
    A1 00            (MAIN)   COLLECTION         0x00 Physical (Usage=0x000A0003: Page=Ordinal Page, Usage=Instance 3, Type=UM) <-- Warning: USAGE type should be CP (Physical)
    05 09              (GLOBAL) USAGE_PAGE         0x0009 Button Page 
    19 01              (LOCAL)  USAGE_MINIMUM      0x00090001 Button 1 Primary/trigger (MULTI=Selector, On/Off, Momentary, or One Shot) 
    29 03              (LOCAL)  USAGE_MAXIMUM      0x00090003 Button 3 Tertiary (MULTI=Selector, On/Off, Momentary, or One Shot) 
    15 00              (GLOBAL) LOGICAL_MINIMUM    0x00 (0) 
    25 01              (GLOBAL) LOGICAL_MAXIMUM    0x01 (1) 
    75 01              (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field 
    95 03              (GLOBAL) REPORT_COUNT       0x03 (3) Number of fields 
    81 02              (MAIN)   INPUT              0x00000002 (3 fields 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 
    05 01              (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
    09 30              (LOCAL)  USAGE              0x00010030 X (DV=Dynamic Value) 
    09 31              (LOCAL)  USAGE              0x00010031 Y (DV=Dynamic Value) 
    15 81              (GLOBAL) LOGICAL_MINIMUM    0x81 (-127) 
    25 7F              (GLOBAL) LOGICAL_MAXIMUM    0x7F (127) 
    75 08              (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field 
    95 02              (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields 
    81 06              (MAIN)   INPUT              0x00000006 (2 fields x 8 bits) 0=Data 1=Variable 1=Relative 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    C0               (MAIN)   END_COLLECTION     Physical
    05 0A            (GLOBAL) USAGE_PAGE         0x000A Ordinal Page 
    09 04            (LOCAL)  USAGE              0x000A0004 Instance 4 (UM=Usage Modifier) 
    85 04            (GLOBAL) REPORT_ID          0x04 (4) 
    A1 00            (MAIN)   COLLECTION         0x00 Physical (Usage=0x000A0004: Page=Ordinal Page, Usage=Instance 4, Type=UM) <-- Warning: USAGE type should be CP (Physical)
    05 09              (GLOBAL) USAGE_PAGE         0x0009 Button Page 
    19 01              (LOCAL)  USAGE_MINIMUM      0x00090001 Button 1 Primary/trigger (MULTI=Selector, On/Off, Momentary, or One Shot) 
    29 03              (LOCAL)  USAGE_MAXIMUM      0x00090003 Button 3 Tertiary (MULTI=Selector, On/Off, Momentary, or One Shot) 
    15 00              (GLOBAL) LOGICAL_MINIMUM    0x00 (0) 
    25 01              (GLOBAL) LOGICAL_MAXIMUM    0x01 (1) 
    75 01              (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field 
    95 03              (GLOBAL) REPORT_COUNT       0x03 (3) Number of fields 
    81 02              (MAIN)   INPUT              0x00000002 (3 fields 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 
    05 01              (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
    09 30              (LOCAL)  USAGE              0x00010030 X (DV=Dynamic Value) 
    09 31              (LOCAL)  USAGE              0x00010031 Y (DV=Dynamic Value) 
    15 81              (GLOBAL) LOGICAL_MINIMUM    0x81 (-127) 
    25 7F              (GLOBAL) LOGICAL_MAXIMUM    0x7F (127) 
    75 08              (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field 
    95 02              (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields 
    81 06              (MAIN)   INPUT              0x00000006 (2 fields x 8 bits) 0=Data 1=Variable 1=Relative 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
    C0               (MAIN)   END_COLLECTION     Physical
    C0             (MAIN)   END_COLLECTION     Logical
    C0           (MAIN)   END_COLLECTION     Application
    
    //--------------------------------------------------------------------------------
    // Vendor-defined featureReport 0F (Device <-> Host)
    //--------------------------------------------------------------------------------
    
    typedef struct
    {
      uint8_t  reportId;                                 // Report ID = 0x0F (15)
      uint8_t  VEN_VendorDefined[9];                     // Value = 0 to 255
    } featureReport0F_t;
    
    
    //--------------------------------------------------------------------------------
    // Vendor-defined inputReport 0F (Device --> Host)
    //--------------------------------------------------------------------------------
    
    typedef struct
    {
      uint8_t  reportId;                                 // Report ID = 0x0F (15)
      uint8_t  VEN_VendorDefined;                        // Value = 0 to 255
    } inputReport0F_t;
    
    
    //--------------------------------------------------------------------------------
    // Vendor-defined outputReport 0F (Device <-- Host)
    //--------------------------------------------------------------------------------
    
    typedef struct
    {
      uint8_t  reportId;                                 // Report ID = 0x0F (15)
      uint8_t  VEN_VendorDefined[7];                     // Value = 0 to 255
    } outputReport0F_t;
    
    
    //--------------------------------------------------------------------------------
    // Button Page inputReport 01 (Device --> Host)
    //--------------------------------------------------------------------------------
    
    typedef struct
    {
      uint8_t  reportId;                                 // Report ID = 0x01 (1)
                                                         // Collection: Mouse Pointer Instance1
      uint8_t  BTN_MousePointerInstance1Button1 : 1;     // Usage 0x00090001: Button 1 Primary/trigger, Value = 0 to 1
      uint8_t  BTN_MousePointerInstance1Button2 : 1;     // Usage 0x00090002: Button 2 Secondary, Value = 0 to 1
      uint8_t  BTN_MousePointerInstance1Button3 : 1;     // Usage 0x00090003: Button 3 Tertiary, Value = 0 to 1
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      int8_t   GD_MousePointerInstance1X;                // Usage 0x00010030: X, Value = -127 to 127
      int8_t   GD_MousePointerInstance1Y;                // Usage 0x00010031: Y, Value = -127 to 127
    } inputReport01_t;
    
    
    //--------------------------------------------------------------------------------
    // Button Page inputReport 02 (Device --> Host)
    //--------------------------------------------------------------------------------
    
    typedef struct
    {
      uint8_t  reportId;                                 // Report ID = 0x02 (2)
                                                         // Collection: Mouse Pointer Instance2
      uint8_t  BTN_MousePointerInstance2Button1 : 1;     // Usage 0x00090001: Button 1 Primary/trigger, Value = 0 to 1
      uint8_t  BTN_MousePointerInstance2Button2 : 1;     // Usage 0x00090002: Button 2 Secondary, Value = 0 to 1
      uint8_t  BTN_MousePointerInstance2Button3 : 1;     // Usage 0x00090003: Button 3 Tertiary, Value = 0 to 1
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      int8_t   GD_MousePointerInstance2X;                // Usage 0x00010030: X, Value = -127 to 127
      int8_t   GD_MousePointerInstance2Y;                // Usage 0x00010031: Y, Value = -127 to 127
    } inputReport02_t;
    
    
    //--------------------------------------------------------------------------------
    // Button Page inputReport 03 (Device --> Host)
    //--------------------------------------------------------------------------------
    
    typedef struct
    {
      uint8_t  reportId;                                 // Report ID = 0x03 (3)
                                                         // Collection: Mouse Pointer Instance3
      uint8_t  BTN_MousePointerInstance3Button1 : 1;     // Usage 0x00090001: Button 1 Primary/trigger, Value = 0 to 1
      uint8_t  BTN_MousePointerInstance3Button2 : 1;     // Usage 0x00090002: Button 2 Secondary, Value = 0 to 1
      uint8_t  BTN_MousePointerInstance3Button3 : 1;     // Usage 0x00090003: Button 3 Tertiary, Value = 0 to 1
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      int8_t   GD_MousePointerInstance3X;                // Usage 0x00010030: X, Value = -127 to 127
      int8_t   GD_MousePointerInstance3Y;                // Usage 0x00010031: Y, Value = -127 to 127
    } inputReport03_t;
    
    
    //--------------------------------------------------------------------------------
    // Button Page inputReport 04 (Device --> Host)
    //--------------------------------------------------------------------------------
    
    typedef struct
    {
      uint8_t  reportId;                                 // Report ID = 0x04 (4)
                                                         // Collection: Mouse Pointer Instance4
      uint8_t  BTN_MousePointerInstance4Button1 : 1;     // Usage 0x00090001: Button 1 Primary/trigger, Value = 0 to 1
      uint8_t  BTN_MousePointerInstance4Button2 : 1;     // Usage 0x00090002: Button 2 Secondary, Value = 0 to 1
      uint8_t  BTN_MousePointerInstance4Button3 : 1;     // Usage 0x00090003: Button 3 Tertiary, Value = 0 to 1
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      uint8_t  : 1;                                      // Pad
      int8_t   GD_MousePointerInstance4X;                // Usage 0x00010030: X, Value = -127 to 127
      int8_t   GD_MousePointerInstance4Y;                // Usage 0x00010031: Y, Value = -127 to 127
    } inputReport04_t;