-
Notifications
You must be signed in to change notification settings - Fork 5
I2C Over HID and USB HID
According Windows Precision TouchPad--Device Bus Connectivity, a Windows Precision Touchpad module that is connected to its Windows host via the I²C bus must, at a minimum, expose the following five connection pins:
- A data line (SDA)
- A clock line (SCL)
- An interrupt line
- A power supply line
- A ground connection (GND)
Also the document suggests using an I2C constant speed of at least 400KHz and having a dedicated I2C controller; otherwise, it may lead to overloading at the I2C bus end.
In addition, the manual also mentions the situation of Touchpad I2C Over USB:
If you decide to use a USB bridge for connecting an I²C Windows Precision Touchpad to its Windows host, then the bridge should expose the touchpad as a distinct device node with the device’s unique attributes (wVendorID, wProductID, wVersionID).
So when it comes to the development, we need to declare HID TouchPad and Multi-Touch in the USB descriptor.
It should be noted that do not attempt to disguise the original ELAN touchpad; otherwise, it may load the wrong driver and eventually enter the wrong device path, resulting in the device not being recognized.
We need to convince Windows that this is a USB HID Touchpad, not the built-in touchpad of the notebook, in order to prevent the driver stack from misjudging.
And our ESP32 needs to convert the I2C Over HID of ELAN to USBHID communication. Briefly speaking, it is to convert the multi-finger state of ELAN to the multi-finger state in the USBHID Touchpad.