On 1/27/2014 12:47, simon@xxxxxxxxxxxxx wrote:
+
+ /* The Dualshock 4 multi-touch trackpad data starts at offset 35 on USB.
+ * The first 7 bits of the first byte is a counter and bit 8 is a touch
+ * indicator that is 0 when pressed and 1 when not pressed.
+ * The next 3 bytes are two 12 bit touch coordinates, X and Y.
+ * The data for the second touch is in the same format and immediatly
+ * follows the data for the first.
+ */
Hi Frank,
I don't know if it helps multitouch, but there is a second set of data in
the HID stream, that is present when a figure is moving/swiping on the
touchpad. This gives us a 'vector' rather than a 'point'.
I previously attempted to describe the format here:
http://www.spinics.net/lists/linux-input/msg28525.html
Ahead of the 'event counter' is a 'point or vector' byte and what might be
a 'pressure' measurement (couldn't really tell).
Interspersed with the data you mention is a second set of X1/Y1/X2/Y2
containing the starting position of the swipe/vector. These are
differentiated with '02' (rather than '01') in the 34'th byte.
Simon.
All the device driver is concerned with is the sending the 'raw' touch
points to the HID layer (ie. point 1/2 is up/down at position X and Y).
The HID layer then tracks the IDs for each contact point and sends the
appropriate events to the user application. It's then up to the
application software to track and interpret it.
See this document for information on the multi-touch protocol:
https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html