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!