Difference between revisions of "IoTGateway/BSP/Android/Gettingstarted/How to configure Capacitive Multi-touch Display"

From ESS-WIKI
Jump to: navigation, search
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
HID interface
+
==== Introduction ====
  
*Enable HID in menuconfig
+
Because the standard to connect custom capacitive touch devices(single- or multi-touch) is not defined, this resulted in having a variety of touch drivers interface. General speaking, USB/HID and I2C are the common hardware interface.
  
{|
+
==== Configure ====
|-
 
|
 
<tt>Device Drivers ---></tt>
 
  
:<tt>Input device support ---></tt>
+
*HID interface
::<tt>'''&lt;*&gt;'''&nbsp;Event interface</tt>
 
::<tt>Miscellaneous devices ---></tt>
 
:::<tt>'''&lt;*&gt;'''&nbsp;User level driver support</tt>
 
:<tt>HID Devices ---></tt>
 
::<tt>'''[*]'''&nbsp;/dev/hidraw raw HID device support</tt>
 
::<tt>Special HID drivers ---></tt>
 
:::<tt>'''&lt;*&gt;'''&nbsp;HID Multitouch panels</tt>
 
  
 +
Enable HID in menuconfig
 +
<pre>Device Drivers --->
 +
      Input device support --->
 +
            <*> Event interface Miscellaneous devices --->
 +
                  <*>User level driver support
 +
&nbsp;      HID Devices --->
 +
            [*]/dev/hidraw raw HID device support Special HID drivers --->
 +
                  <*> HID Multitouch panels&nbsp;</pre>
  
 +
*I2C interface
  
|}
+
Enable I2C bus&nbsp;in menuconfig
  
:copy and rename&nbsp;<code>.config</code>&nbsp;to <code>arch/arm/configs/imx_v7_android_defconfig&lt;code&gt;</code>&lt;/code&gt;<br/>
+
 
 +
<pre>Device drivers --->
 +
        I2C support  --->
 +
            <*> I2C support
 +
                [*]  Enable compatibility bits for old user-space
 +
                <*>  I2C device interface
 +
                <*>  I2C bus multiplexing support
 +
                        Multiplexer I2C Chip support  --->
 +
             
 +
</pre>
 +
 
 +
copy and rename&nbsp;.config&nbsp;to arch/arm/configs/imx_v7_android_defconfig
  
 
==== Test ====
 
==== Test ====
  
The ''getevent'' &nbsp;tool runs on the device and provides information about input devices and a live dump of kernel input events.
+
The ''getevent''&nbsp;tool provides information about the touch&nbsp;device.
 
 
Unexport GPIO 27
 
 
<pre># getevent -lt
 
<pre># getevent -lt
 +
[  78826.389007] EV_ABS      ABS_MT_TRACKING_ID  0000001f
 +
[  78826.389038] EV_ABS      ABS_MT_PRESSURE      000000ab
 +
[  78826.389038] EV_ABS      ABS_MT_POSITION_X    000000ab
 +
[  78826.389068] EV_ABS      ABS_MT_POSITION_Y    0000025b
 +
[  78826.389068] EV_ABS      ABS_MT_SLOT          00000001
 +
[  78826.389068] EV_ABS      ABS_MT_TRACKING_ID  00000020
 +
[  78826.389068] EV_ABS      ABS_MT_PRESSURE      000000b9
 +
[  78826.389099] EV_ABS      ABS_MT_POSITION_X    0000019e
 +
[  78826.389099] EV_ABS      ABS_MT_POSITION_Y    00000361
 +
[  78826.389099] EV_SYN      SYN_REPORT          00000000
 +
[  78826.468688] EV_ABS      ABS_MT_SLOT          00000000
 +
[  78826.468688] EV_ABS      ABS_MT_TRACKING_ID  ffffffff
 +
[  78826.468719] EV_ABS      ABS_MT_SLOT          00000001
 +
[  78826.468719] EV_ABS      ABS_MT_TRACKING_ID  ffffffff
 +
[  78826.468719] EV_SYN      SYN_REPORT          00000000
 
</pre>
 
</pre>
  
 
+
For developer mode option, showing touch points and locations&nbsp;on the screen
 
+
<pre>Settings > Developer Options > Show touches
==== Test[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Gettingstarted/How_to_use_GPIO&action=edit&section=6 edit]] ====
+
Settings > Developer Options > pointer location
<pre><code>$ getevent -lt
+
</pre>
 
 
[ &nbsp; 78826.389007] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_TRACKING_ID &nbsp; 0000001f
 
[ &nbsp; 78826.389038] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_PRESSURE &nbsp; &nbsp; &nbsp;000000ab
 
[ &nbsp; 78826.389038] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_POSITION_X &nbsp; &nbsp;000000ab
 
[ &nbsp; 78826.389068] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_POSITION_Y &nbsp; &nbsp;0000025b
 
[ &nbsp; 78826.389068] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_SLOT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00000001
 
[ &nbsp; 78826.389068] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_TRACKING_ID &nbsp; 00000020
 
[ &nbsp; 78826.389068] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_PRESSURE &nbsp; &nbsp; &nbsp;000000b9
 
[ &nbsp; 78826.389099] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_POSITION_X &nbsp; &nbsp;0000019e
 
[ &nbsp; 78826.389099] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_POSITION_Y &nbsp; &nbsp;00000361
 
[ &nbsp; 78826.389099] EV_SYN &nbsp; &nbsp; &nbsp; SYN_REPORT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 00000000
 
[ &nbsp; 78826.468688] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_SLOT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00000000
 
[ &nbsp; 78826.468688] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_TRACKING_ID &nbsp; ffffffff
 
[ &nbsp; 78826.468719] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_SLOT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00000001
 
[ &nbsp; 78826.468719] EV_ABS &nbsp; &nbsp; &nbsp; ABS_MT_TRACKING_ID &nbsp; ffffffff
 
[ &nbsp; 78826.468719] EV_SYN &nbsp; &nbsp; &nbsp; SYN_REPORT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 00000000
 
</code></pre>
 

Latest revision as of 09:31, 3 February 2017

Introduction

Because the standard to connect custom capacitive touch devices(single- or multi-touch) is not defined, this resulted in having a variety of touch drivers interface. General speaking, USB/HID and I2C are the common hardware interface.

Configure

  • HID interface

Enable HID in menuconfig

Device Drivers --->
       Input device support --->
            <*> Event interface Miscellaneous devices --->
                  <*>User level driver support 
       HID Devices --->
            [*]/dev/hidraw raw HID device support Special HID drivers --->
                  <*> HID Multitouch panels 
  • I2C interface

Enable I2C bus in menuconfig


Device drivers --->
        I2C support  --->
            <*> I2C support
                [*]   Enable compatibility bits for old user-space
                <*>   I2C device interface
                <*>   I2C bus multiplexing support
                        Multiplexer I2C Chip support  --->
               

copy and rename .config to arch/arm/configs/imx_v7_android_defconfig

Test

The getevent tool provides information about the touch device.

# getevent -lt
[   78826.389007] EV_ABS       ABS_MT_TRACKING_ID   0000001f
[   78826.389038] EV_ABS       ABS_MT_PRESSURE      000000ab
[   78826.389038] EV_ABS       ABS_MT_POSITION_X    000000ab
[   78826.389068] EV_ABS       ABS_MT_POSITION_Y    0000025b
[   78826.389068] EV_ABS       ABS_MT_SLOT          00000001
[   78826.389068] EV_ABS       ABS_MT_TRACKING_ID   00000020
[   78826.389068] EV_ABS       ABS_MT_PRESSURE      000000b9
[   78826.389099] EV_ABS       ABS_MT_POSITION_X    0000019e
[   78826.389099] EV_ABS       ABS_MT_POSITION_Y    00000361
[   78826.389099] EV_SYN       SYN_REPORT           00000000
[   78826.468688] EV_ABS       ABS_MT_SLOT          00000000
[   78826.468688] EV_ABS       ABS_MT_TRACKING_ID   ffffffff
[   78826.468719] EV_ABS       ABS_MT_SLOT          00000001
[   78826.468719] EV_ABS       ABS_MT_TRACKING_ID   ffffffff
[   78826.468719] EV_SYN       SYN_REPORT           00000000

For developer mode option, showing touch points and locations on the screen

Settings > Developer Options > Show touches
Settings > Developer Options > pointer location