Gavin 发表于 2023-2-5 23:06:36

STC8H8K64U把电容触摸I2C转成USB信号-多点问题

各位大佬,用STC8H8K遇到如下问题,有了解的帮忙提供下解决思路,有参考例程的最好了,谢谢!背景:基于STC8 USB 鼠标例程已经调通触摸屏单点触控,需求是实现触摸屏I2C转USB 多点触控(支持5指或10指)问题:在单点触控程序基础上主要修改HID Report Descriptor,Win7上USBLyzer上可以收到触摸屏上的坐标数据(上图以2指触控为例),但只能识别一指划线效果,切换到Win11上表现为完全无反应(装USBLyzer后USB无法抓数据,因此未测此时USB数据)
1、         请问这种情况应该如何解决?用的的描述符如下ConnectionStatus Device connected CurrentConfiguration 1 Speed Full (12Mbit/s) Device Address 4Number Of OpenPipes 4 DeviceDescriptor STC USB MouseOffset FieldSize Value Description 0 bLength 112h1bDescriptorType 1 01h Device 2 bcdUSB 2 0200hUSB Spec 2.0 4 bDeviceClass 100h Class info in Ifc Descriptors 5bDeviceSubClass 1 00h6bDeviceProtocol 1 00h7bMaxPacketSize0 1 40h 64 bytes 8 idVendor 2EEEFh10 idProduct 22828h12 bcdDevice 20000h 0.00 14 iManufacturer1 01h "STC" 15 iProduct 102h "STC USB Mouse" 16 iSerialNumber1 00h17bNumConfigurations 1 01h ConfigurationDescriptor 1 Bus Powered, 100 mAOffset FieldSize Value Description 0 bLength 109h1bDescriptorType 1 02h Configuration 2 wTotalLength 20049h4 bNumInterfaces1 02h5bConfigurationValue 1 01h6 iConfiguration1 00h7 bmAttributes 1A0h Bus Powered, Remote Wakeup 4..0: Reserved ...00000    5: Remote Wakeup..1..... Yes 6: Self Powered.0...... No, Bus Powered 7: Reserved (set to one)(bus-powered for1.0)1.......   8 bMaxPower 132h 100 mA InterfaceDescriptor 0/0 HID, 2 EndpointsOffset FieldSize Value Description 0 bLength 109h1bDescriptorType 1 04h Interface 2 bInterfaceNumber1 00h3bAlternateSetting 1 00h4 bNumEndpoints1 02h5bInterfaceClass 1 03h HID 6bInterfaceSubClass 1 01h Boot Interface 7bInterfaceProtocol 1 02h Mouse 8 iInterface 100h HID Descriptor Offset FieldSize Value Description 0 bLength 109h1bDescriptorType 1 21h HID 2 bcdHID 2 0111h1.11 4 bCountryCode 100h5bNumDescriptors 1 01h6bDescriptorType 1 22h Report 7wDescriptorLength 2 02DFh 735 bytes EndpointDescriptor 81 1 In, Interrupt, 5 msOffset FieldSize Value Description 0 bLength 107h1bDescriptorType 1 05h Endpoint 2bEndpointAddress 1 81h 1 In 3 bmAttributes 103h Interrupt 1..0: Transfer Type......11 Interrupt 7..2: Reserved 000000..   4 wMaxPacketSize2 0040h 64 bytes 6 bInterval 105h 5 ms EndpointDescriptor 02 2 Out, Interrupt, 8 msOffset FieldSize Value Description 0 bLength 107h1bDescriptorType 1 05h Endpoint 2bEndpointAddress 1 02h 2 Out 3 bmAttributes 103h Interrupt 1..0: Transfer Type......11 Interrupt 7..2: Reserved 000000..   4 wMaxPacketSize2 0040h 64 bytes 6 bInterval 108h 8 ms InterfaceDescriptor 1/0 HID, 2 EndpointsOffset FieldSize Value Description 0 bLength 109h1 bDescriptorType1 04h Interface 2bInterfaceNumber 1 01h3bAlternateSetting 1 00h4 bNumEndpoints1 02h5bInterfaceClass 1 03h HID 6bInterfaceSubClass 1 01h Boot Interface 7bInterfaceProtocol 1 02h Mouse 8 iInterface 100h HID Descriptor Offset FieldSize Value Description 0 bLength 109h1bDescriptorType 1 21h HID 2 bcdHID 2 0111h1.11 4 bCountryCode 100h5bNumDescriptors 1 01h6bDescriptorType 1 22h Report 7wDescriptorLength 2 008Eh 142 bytes EndpointDescriptor 83 3 In, Interrupt, 8 msOffset FieldSize Value Description 0 bLength 107h1bDescriptorType 1 05h Endpoint 2bEndpointAddress 1 83h 3 In 3 bmAttributes 103h Interrupt 1..0: Transfer Type......11 Interrupt 7..2: Reserved 000000..   4 wMaxPacketSize2 0040h 64 bytes 6 bInterval 108h 8 ms EndpointDescriptor 04 4 Out, Interrupt, 8 msOffset FieldSize Value Description 0 bLength 107h1bDescriptorType 1 05h Endpoint 2bEndpointAddress 1 04h 4 Out 3 bmAttributes 103h Interrupt 1..0: Transfer Type......11 Interrupt 7..2: Reserved 000000..   4 wMaxPacketSize2 0040h 64 bytes 6 bInterval 108h 8 ms Interface 0 HIDReport Descriptor Touch ScreenItem Tag (Value)Raw Data Usage Page(Digitizer) 05 0DUsage (TouchScreen) 09 04Collection(Application) A1 01    Report ID (1) 85 01    Usage (Finger) 09 22    Collection (Logical) A1 02      Usage (Tip Switch) 09 42      Logical Minimum (0) 15 00      Logical Maximum (1) 25 01      Report Size (1) 75 01      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Report Size (7) 75 07      Usage (Contact Identifier) 09 51      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Generic Desktop) 05 01      Report Size (16) 75 10      Unit Exponent (-2) 55 0E      Unit (Eng Lin: Length (in)) 65 13      Usage (X) 09 30      Logical Maximum (1280) 27 00 05 0000      Physical Minimum (0) 35 00      Physical Maximum (854) 47 56 03 0000      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Logical Maximum (800) 27 20 03 0000      Physical Maximum (533) 47 15 02 0000      Usage (Y) 09 31      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Digitizer) 05 0D    End Collection C0    Usage (Finger) 09 22    Collection (Logical) A1 02      Usage (Tip Switch) 09 42      Logical Minimum (0) 15 00      Logical Maximum (1) 25 01      Report Size (1) 75 01      Report Count (1) 95 01      Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02      Report Size (7) 75 07      Usage (Contact Identifier) 09 51      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Generic Desktop) 05 01      Report Size (16) 75 10      Unit Exponent (-2) 55 0E      Unit (Eng Lin: Length (in)) 65 13      Usage (X) 09 30      Logical Maximum (1280) 27 00 05 0000      Physical Minimum (0) 35 00      Physical Maximum (854) 47 56 03 0000      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Logical Maximum (800) 27 20 03 0000      Physical Maximum (533) 47 15 02 0000      Usage (Y) 09 31      Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02      Usage Page (Digitizer) 05 0D    End Collection C0    Usage (Finger) 09 22    Collection (Logical) A1 02      Usage (Tip Switch) 09 42      Logical Minimum (0) 15 00      Logical Maximum (1) 25 01      Report Size (1) 75 01      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Report Size (7) 75 07      Usage (Contact Identifier) 09 51      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Generic Desktop) 05 01      Report Size (16) 75 10      Unit Exponent (-2) 55 0E      Unit (Eng Lin: Length (in)) 65 13      Usage (X) 09 30      Logical Maximum (1280) 27 00 05 0000      Physical Minimum (0) 35 00      Physical Maximum (854) 47 56 03 0000      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Logical Maximum (800) 27 20 03 0000      Physical Maximum (533) 47 15 02 0000      Usage (Y) 09 31      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Digitizer) 05 0D    End Collection C0    Usage (Finger) 09 22    Collection (Logical) A1 02      Usage (Tip Switch) 09 42      Logical Minimum (0) 15 00      Logical Maximum (1) 25 01      Report Size (1) 75 01      Report Count (1) 95 01      Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02      Report Size (7) 75 07      Usage (Contact Identifier) 09 51      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Generic Desktop) 05 01      Report Size (16) 75 10      Unit Exponent (-2) 55 0E      Unit (Eng Lin: Length (in)) 65 13      Usage (X) 09 30      Logical Maximum (1280) 27 00 05 0000      Physical Minimum (0) 35 00      Physical Maximum (854) 47 56 03 0000      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Logical Maximum (800) 27 20 03 0000      Physical Maximum (533) 47 15 02 0000      Usage (Y) 09 31      Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02      Usage Page (Digitizer) 05 0D    End Collection C0    Usage (Finger) 09 22    Collection (Logical) A1 02      Usage (Tip Switch) 09 42      Logical Minimum (0) 15 00      Logical Maximum (1) 25 01      Report Size (1) 75 01      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Report Size (7) 75 07      Usage (Contact Identifier) 09 51      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Generic Desktop) 05 01      Report Size (16) 75 10      Unit Exponent (-2) 55 0E      Unit (Eng Lin: Length (in)) 65 13      Usage (X) 09 30      Logical Maximum (1280) 27 00 05 0000      Physical Minimum (0) 35 00      Physical Maximum (854) 47 56 03 0000      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Logical Maximum (800) 27 20 03 0000      Physical Maximum (533) 47 15 02 0000      Usage (Y) 09 31      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Digitizer) 05 0D    End Collection C0    Usage (Finger) 09 22    Collection (Logical) A1 02      Usage (Tip Switch) 09 42      Logical Minimum (0) 15 00      Logical Maximum (1) 25 01      Report Size (1) 75 01      Report Count (1) 95 01      Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02      Report Size (7) 75 07      Usage (Contact Identifier) 09 51      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Generic Desktop) 05 01      Report Size (16) 75 10      Unit Exponent (-2) 55 0E      Unit (Eng Lin: Length (in)) 65 13      Usage (X) 09 30      Logical Maximum (1280) 27 00 05 0000      Physical Minimum (0) 35 00      Physical Maximum (854) 47 56 03 0000      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Logical Maximum (800) 27 20 03 0000      Physical Maximum (533) 47 15 02 0000      Usage (Y) 09 31      Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02      Usage Page (Digitizer) 05 0D    End Collection C0    Usage (Finger) 09 22    Collection (Logical) A1 02      Usage (Tip Switch) 09 42      Logical Minimum (0) 15 00      Logical Maximum (1) 25 01      Report Size (1) 75 01      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Report Size (7) 75 07      Usage (Contact Identifier) 09 51      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Generic Desktop) 05 01      Report Size (16) 75 10      Unit Exponent (-2) 55 0E      Unit (Eng Lin: Length (in)) 65 13      Usage (X) 09 30      Logical Maximum (1280) 27 00 05 0000      Physical Minimum (0) 35 00      Physical Maximum (854) 47 56 03 0000      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Logical Maximum (800) 27 20 03 0000      Physical Maximum (533) 47 15 02 0000      Usage (Y) 09 31      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Digitizer) 05 0D    End Collection C0    Usage (Finger) 09 22    Collection (Logical) A1 02      Usage (Tip Switch) 09 42      Logical Minimum (0) 15 00      Logical Maximum (1) 25 01      Report Size (1) 75 01      Report Count (1) 95 01      Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02      Report Size (7) 75 07      Usage (Contact Identifier) 09 51      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Generic Desktop) 05 01      Report Size (16) 75 10      Unit Exponent (-2) 55 0E      Unit (Eng Lin: Length (in)) 65 13      Usage (X) 09 30      Logical Maximum (1280) 27 00 05 0000      Physical Minimum (0) 35 00      Physical Maximum (854) 47 56 03 0000      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Logical Maximum (800) 27 20 03 0000      Physical Maximum (533) 47 15 02 0000      Usage (Y) 09 31      Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02      Usage Page (Digitizer) 05 0D    End Collection C0    Usage (Finger) 09 22    Collection (Logical) A1 02      Usage (Tip Switch) 09 42      Logical Minimum (0) 15 00      Logical Maximum (1) 25 01      Report Size (1) 75 01      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Report Size (7) 75 07      Usage (Contact Identifier) 09 51      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Generic Desktop) 05 01      Report Size (16) 75 10      Unit Exponent (-2) 55 0E      Unit (Eng Lin: Length (in)) 65 13      Usage (X) 09 30      Logical Maximum (1280) 27 00 05 0000      Physical Minimum (0) 35 00      Physical Maximum (854) 47 56 03 0000      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Logical Maximum (800) 27 20 03 0000      Physical Maximum (533) 47 15 02 0000      Usage (Y) 09 31      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Digitizer) 05 0D    End Collection C0    Usage (Finger) 09 22    Collection (Logical) A1 02      Usage (Tip Switch) 09 42      Logical Minimum (0) 15 00      Logical Maximum (1) 25 01      Report Size (1) 75 01      Report Count (1) 95 01      Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02      Report Size (7) 75 07      Usage (Contact Identifier) 09 51      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Usage Page (Generic Desktop) 05 01      Report Size (16) 75 10      Unit Exponent (-2) 55 0E      Unit (Eng Lin: Length (in)) 65 13      Usage (X) 09 30      Logical Maximum (1280) 27 00 05 0000      Physical Minimum (0) 35 00      Physical Maximum (854) 47 56 03 0000      Report Count (1) 95 01      Input(Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02       Logical Maximum (800) 27 20 03 0000      Physical Maximum (533) 47 15 02 0000      Usage (Y) 09 31      Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02      Usage Page (Digitizer) 05 0D    End Collection C0    Usage Page (Digitizer) 05 0D    Logical Maximum (268435455) 27 FF FF FF0F    Report Size (32) 75 20    Report Count (1) 95 01    Usage (Scan Time) 09 56    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02    Usage (Contact Count) 09 54    Logical Maximum (127) 25 7F    Report Count (1) 95 01    Report Size (8) 75 08    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02    Report ID (3) 85 03    Usage (Contact Count Maximum) 09 55    Usage (Device Identifier) 09 53    Report Count (2) 95 02    Logical Maximum (10) 25 0A    Feature(Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) B1 02    Report ID (68) 85 44    Usage Page (Vendor-Defined 1) 06 00 FF    Usage (Vendor-Defined 197) 09 C5    Logical Minimum (0) 15 00    Logical Maximum (255) 26 FF 00    Report Size (8) 75 08    Report Count (256) 96 00 01    Feature(Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) B1 02End CollectionC0 Interface 1 HIDReport Descriptor Vendor-Defined 1Item Tag (Value)Raw Data Usage Page(Vendor-Defined 256) 06 FF FFUsage(Vendor-Defined 1) 09 01Collection(Application) A1 01    Usage (Vendor-Defined 2) 09 02    Usage (Vendor-Defined 3) 09 03    Report ID (2) 85 02    Logical Minimum (0) 15 00    Logical Maximum (255) 26 FF 00    Report Size (8) 75 08    Report Count (63) 95 3F    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02    Usage (Vendor-Defined 4) 09 04    Usage (Vendor-Defined 5) 09 05    Logical Minimum (0) 15 00    Logical Maximum (255) 26 FF 00    Report Size (8) 75 08    Report Count (63) 95 3F    Output(Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 02    Usage (Vendor-Defined 6) 09 06    Usage (Vendor-Defined 7) 09 07    Report ID (241) 85 F1    Logical Minimum (0) 15 00    Logical Maximum (255) 26 FF 00    Report Size (8) 75 08    Report Count (7) 95 07    Output(Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 02    Usage (Vendor-Defined 8) 09 08    Usage (Vendor-Defined 9) 09 09    Report ID (242) 85 F2    Logical Minimum (0) 15 00    Logical Maximum (255) 26 FF 00    Report Size (8) 75 08    Report Count (63) 95 3F    Output(Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 02    Usage (Vendor-Defined 10) 09 0A    Usage(Vendor-Defined 11) 09 0B    Report ID (243) 85 F3    Logical Minimum (0) 15 00    Logical Maximum (255) 26 FF 00    Report Size (8) 75 08    Report Count (7) 95 07    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02    Usage (Vendor-Defined 12) 09 0C    Usage (Vendor-Defined 13) 09 0D    Report ID (244) 85 F4    Logical Minimum (0) 15 00    Logical Maximum (255) 26 FF 00    Report Size (8) 75 08    Report Count (63) 95 3F    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02    Usage (Vendor-Defined 14) 09 0E    Usage (Vendor-Defined 15) 09 0F    Report ID (245) 85 F5    Logical Minimum (0) 15 00    Logical Maximum (255) 26 FF 00    Report Size (8) 75 08    Report Count (63) 95 3F    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02    Usage (Vendor-Defined 16) 09 10    Usage (Vendor-Defined 17) 09 11    Report ID (246) 85 F6    Logical Minimum (0) 15 00    Logical Maximum (255) 26 FF 00    Report Size (8) 75 08    Report Count (63) 95 3F    Output(Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 02
End CollectionC0

国芯人工智能 发表于 2023-2-6 13:26:27

我们研究一下,实现您的功能,需要一些时间。届时会回复您:loveliness:

GZQUICK 发表于 2023-10-11 17:31:43

可以了吗?正好需要一份!可以发一下份吗?感谢

GZQUICK 发表于 2023-10-24 22:49:10

搞定了吗?

owen_0051 发表于 2024-5-31 11:52:04

报告描述符是用什么工具写的?
页: [1]
查看完整版本: STC8H8K64U把电容触摸I2C转成USB信号-多点问题