WIN7 under USB Multi-touch, one time to send multiple packets delay problem, important!

Source: Internet
Author: User

the problem is common and takes about one weeks to solve. Hardware-related stuff is too much to pit, and these pits are not as visible as code.   use Mixed mode to report up to 2 points at a time. If it is 5, it needs to be escalated three times. The problem is that Atmel's CTP is the most 3ms,3 points above the card. sending USB data is always not ready, resulting in unsuccessful delivery, waiting for dozens of MS to continue sending. finally found that the endpoint query time is set to 32ms, changed to 10ms is good and hard, and then changed to 5ms,1ms are no problem. WIN7 without considering the power saving, the direct 1ms query interval is good. endpoint descriptor for configuration descriptor
    /* -*/    0x07,/*blength:endpoint Descriptor Size*/Usb_endpoint_descriptor_type,/*bDescriptorType:*/    0x81,/*bendpointaddress:endpoint Address (in)*/    0x03,/*Bmattributes:interrupt Endpoint*/     0x0e,/*wmaxpacketsize:14 Byte Max*/    0x00,    0x01,/*binterval:polling Interval (ms)*/    /* the*/  }

But what if 3, 4 points will also time out without responding to interrupts? Because you have to report two times, the code setting delay is already 2ms, plus a pair of code, absolutely more than 3ms. so the delay from 1ms to 500us is reported when the packet is divided into 2 packets as follows:            
Else // other packages, set to 0             {                    delay_us (+);                 reportbuf[0;            }

  finally still can not 5 points, 5 points directly disorderly report. It seems that the real firmware does not support 5 points, so read only 4 points   For (i=0;i<4;i++)
{
if (finger[i].x>4095 | | finger[i].y>4095)
{
Break
}

WIN7 under USB Multi-touch, one time to send multiple packets delay problem, important!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.