| 1 |
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later |
| 2 |
.. c:namespace:: V4L |
| 3 |
|
| 4 |
.. _touch: |
| 5 |
|
| 6 |
************* |
| 7 |
Touch Devices |
| 8 |
************* |
| 9 |
|
| 10 |
Touch devices are accessed through character device special files named |
| 11 |
``/dev/v4l-touch0`` to ``/dev/v4l-touch255`` with major number 81 and |
| 12 |
dynamically allocated minor numbers 0 to 255. |
| 13 |
|
| 14 |
Overview |
| 15 |
======== |
| 16 |
|
| 17 |
Sensors may be Optical, or Projected Capacitive touch (PCT). |
| 18 |
|
| 19 |
Processing is required to analyse the raw data and produce input events. In |
| 20 |
some systems, this may be performed on the ASIC and the raw data is purely a |
| 21 |
side-channel for diagnostics or tuning. In other systems, the ASIC is a simple |
| 22 |
analogue front end device which delivers touch data at high rate, and any touch |
| 23 |
processing must be done on the host. |
| 24 |
|
| 25 |
For capacitive touch sensing, the touchscreen is composed of an array of |
| 26 |
horizontal and vertical conductors (alternatively called rows/columns, X/Y |
| 27 |
lines, or tx/rx). Mutual Capacitance measured is at the nodes where the |
| 28 |
conductors cross. Alternatively, Self Capacitance measures the signal from each |
| 29 |
column and row independently. |
| 30 |
|
| 31 |
A touch input may be determined by comparing the raw capacitance measurement to |
| 32 |
a no-touch reference (or "baseline") measurement: |
| 33 |
|
| 34 |
Delta = Raw - Reference |
| 35 |
|
| 36 |
The reference measurement takes account of variations in the capacitance across |
| 37 |
the touch sensor matrix, for example manufacturing irregularities, |
| 38 |
environmental or edge effects. |
| 39 |
|
| 40 |
Querying Capabilities |
| 41 |
===================== |
| 42 |
|
| 43 |
Devices supporting the touch interface set the ``V4L2_CAP_VIDEO_CAPTURE`` flag |
| 44 |
and the ``V4L2_CAP_TOUCH`` flag in the ``capabilities`` field of |
| 45 |
:c:type:`v4l2_capability` returned by the |
| 46 |
:ref:`VIDIOC_QUERYCAP` ioctl. |
| 47 |
|
| 48 |
At least one of the read/write or streaming I/O methods must be |
| 49 |
supported. |
| 50 |
|
| 51 |
The formats supported by touch devices are documented in |
| 52 |
:ref:`Touch Formats <tch-formats>`. |
| 53 |
|
| 54 |
Data Format Negotiation |
| 55 |
======================= |
| 56 |
|
| 57 |
A touch device may support any I/O method. |