STC8H8K64U把电容触摸I2C转成USB信号-多点问题
2023-2-5 23:06 来自 Gavin 发布 @ 综合讨论
各位大佬,用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 112h 1bDescriptorType 1 01h Device 2 bcdUSB 2 0200hUSB Spec 2.0 4 bDeviceClass 100h Class info in Ifc Descriptors 5bDeviceSubClass 1 00h 6bDeviceProtocol 1 00h 7bMaxPacketSize0 1 40h 64 bytes 8 idVendor 2EEEFh 10 idProduct 22828h 12 bcdDevice 20000h 0.00 14 iManufacturer1 01h "STC" 15 iProduct 102h "STC USB Mouse" 16 iSerialNumber1 00h 17bNumConfigurations 1 01h ConfigurationDescriptor 1 Bus Powered, 100 mAOffset FieldSize Value Description 0 bLength 109h 1bDescriptorType 1 02h Configuration 2 wTotalLength 20049h 4 bNumInterfaces1 02h 5bConfigurationValue 1 01h 6 iConfiguration1 00h 7 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 109h 1bDescriptorType 1 04h Interface 2 bInterfaceNumber1 00h 3bAlternateSetting 1 00h 4 bNumEndpoints1 02h 5bInterfaceClass 1 03h HID 6bInterfaceSubClass 1 01h Boot Interface 7bInterfaceProtocol 1 02h Mouse 8 iInterface 100h HID Descriptor Offset FieldSize Value Description 0 bLength 109h 1bDescriptorType 1 21h HID 2 bcdHID 2 0111h1.11 4 bCountryCode 100h 5bNumDescriptors 1 01h 6bDescriptorType 1 22h Report 7wDescriptorLength 2 02DFh 735 bytes EndpointDescriptor 81 1 In, Interrupt, 5 msOffset FieldSize Value Description 0 bLength 107h 1bDescriptorType 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 107h 1bDescriptorType 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 109h 1 bDescriptorType1 04h Interface 2bInterfaceNumber 1 01h 3bAlternateSetting 1 00h 4 bNumEndpoints1 02h 5bInterfaceClass 1 03h HID 6bInterfaceSubClass 1 01h Boot Interface 7bInterfaceProtocol 1 02h Mouse 8 iInterface 100h HID Descriptor Offset FieldSize Value Description 0 bLength 109h 1bDescriptorType 1 21h HID 2 bcdHID 2 0111h1.11 4 bCountryCode 100h 5bNumDescriptors 1 01h 6bDescriptorType 1 22h Report 7wDescriptorLength 2 008Eh 142 bytes EndpointDescriptor 83 3 In, Interrupt, 8 msOffset FieldSize Value Description 0 bLength 107h 1bDescriptorType 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 107h 1bDescriptorType 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 0D Usage (TouchScreen) 09 04 Collection(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 [
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 112h 1bDescriptorType 1 01h Device 2 bcdUSB 2 0200hUSB Spec 2.0 4 bDeviceClass 100h Class info in Ifc Descriptors 5bDeviceSubClass 1 00h 6bDeviceProtocol 1 00h 7bMaxPacketSize0 1 40h 64 bytes 8 idVendor 2EEEFh 10 idProduct 22828h 12 bcdDevice 20000h 0.00 14 iManufacturer1 01h "STC" 15 iProduct 102h "STC USB Mouse" 16 iSerialNumber1 00h 17bNumConfigurations 1 01h ConfigurationDescriptor 1 Bus Powered, 100 mAOffset FieldSize Value Description 0 bLength 109h 1bDescriptorType 1 02h Configuration 2 wTotalLength 20049h 4 bNumInterfaces1 02h 5bConfigurationValue 1 01h 6 iConfiguration1 00h 7 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 109h 1bDescriptorType 1 04h Interface 2 bInterfaceNumber1 00h 3bAlternateSetting 1 00h 4 bNumEndpoints1 02h 5bInterfaceClass 1 03h HID 6bInterfaceSubClass 1 01h Boot Interface 7bInterfaceProtocol 1 02h Mouse 8 iInterface 100h HID Descriptor Offset FieldSize Value Description 0 bLength 109h 1bDescriptorType 1 21h HID 2 bcdHID 2 0111h1.11 4 bCountryCode 100h 5bNumDescriptors 1 01h 6bDescriptorType 1 22h Report 7wDescriptorLength 2 02DFh 735 bytes EndpointDescriptor 81 1 In, Interrupt, 5 msOffset FieldSize Value Description 0 bLength 107h 1bDescriptorType 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 107h 1bDescriptorType 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 109h 1 bDescriptorType1 04h Interface 2bInterfaceNumber 1 01h 3bAlternateSetting 1 00h 4 bNumEndpoints1 02h 5bInterfaceClass 1 03h HID 6bInterfaceSubClass 1 01h Boot Interface 7bInterfaceProtocol 1 02h Mouse 8 iInterface 100h HID Descriptor Offset FieldSize Value Description 0 bLength 109h 1bDescriptorType 1 21h HID 2 bcdHID 2 0111h1.11 4 bCountryCode 100h 5bNumDescriptors 1 01h 6bDescriptorType 1 22h Report 7wDescriptorLength 2 008Eh 142 bytes EndpointDescriptor 83 3 In, Interrupt, 8 msOffset FieldSize Value Description 0 bLength 107h 1bDescriptorType 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 107h 1bDescriptorType 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 0D Usage (TouchScreen) 09 04 Collection(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 [
免责声明:
本平台旨在开源共享精神,请勿发布敏感信息,任何违法信息我们将移交公安机关;