I need to find out HID-compliant touch screen(single touch) input data structure(like byte ordering and what should be written in each byte).
I have used HID-compliant touchscreen descriptor from Microsoft official docs
and in host PC using device Manager I am able to see that it successfully enumerates HID -compliant device. Now I want to send HID report to the host but the problem is that I haven't found something like HID boot protocol for touchscreen (for mouse and keyboard it is clearly defined in USB org spec). This is a code sample that I am using to create touchscreen HID report and it works but not as expected. I found this combination of bytes by researching a lot of github codes and reading articles but I want to find some document by which I can proof that the ordering is correct.
char report[8] = {0};
uint16_t x_access = 10000;
uint16_t y_access = 10000;
report[0] = 0x01; //reportid
report[1] = 0x3; //statuss
report[2] = LOWBYTE(x_access); //x low byte
report[3] = HIGHBYTE(x_access); //x high byte
report[4] = LOWBYTE(y_access); //y low byte
report[5] = HIGHBYTE(y_access); //y high byte
report[6] = 0x65; //touch parsing time low byte
report[7] = 0x00; //touch parsing time high byte
//report[8] = 1 //this doesn't have any impact (touch count)
Useful links that I have used
- https://www.usb.org/hid
- http://ww1.microchip.com/downloads/en/DeviceDoc/mXT1386E_2v9_Datasheet_BX.pdf
- https://www.interelectronix.com/de/sis95xx-series-touch-data-format.html
- http://ww1.microchip.com/downloads/en/devicedoc/41606b.pdf
Thanks in advance for the help