IMX UserButtons: Difference between revisions

From Variscite Wiki
m (Eran moved page DART-6UL UserButton to IMX UserButtons)
No edit summary
Line 1: Line 1:
{{PageHeader|DART-6UL - User Button}} {{DocImage|category1=DART-6UL|category2=Yocto}} __toc__
{{PageHeader|User Buttons}} {{DocImage|category1=Yocto|category2=VAR-SOM-MX6}}[[Category:DART-6UL]][[Category:VAR-SOM-MX7]] __toc__
<pre>$ hexdump /dev/input/event0
To test any event device, run the following and the available devices will be listed and numbered:
And push the user button SW4
<pre>
$ evtest
</pre>
Then, select the device event number you want to test, and use the device - in this case, push the button.<br>
<br>
For example, on the VAR-SOM-MX7:
<pre>
root@imx7-var-som:~# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      30370000.snvs:snvs-powerkey
/dev/input/event1:      ADS7846 Touchscreen
/dev/input/event2:      ft5x06_ts
/dev/input/event3:      gpio-keys
Select the device event number [0-3]: 3
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio-keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 102 (KEY_HOME)
    Event code 139 (KEY_MENU)
    Event code 158 (KEY_BACK)
Properties:
Testing ... (interrupt to exit)
Event: time 1474554375.147272, type 1 (EV_KEY), code 158 (KEY_BACK), value 1
Event: time 1474554375.147272, -------------- SYN_REPORT ------------
Event: time 1474554375.247234, type 1 (EV_KEY), code 158 (KEY_BACK), value 0
Event: time 1474554375.247234, -------------- SYN_REPORT ------------
Event: time 1474554376.217208, type 1 (EV_KEY), code 102 (KEY_HOME), value 1
Event: time 1474554376.217208, -------------- SYN_REPORT ------------
Event: time 1474554376.337219, type 1 (EV_KEY), code 102 (KEY_HOME), value 0
Event: time 1474554376.337219, -------------- SYN_REPORT ------------
Event: time 1474554377.317246, type 1 (EV_KEY), code 139 (KEY_MENU), value 1
Event: time 1474554377.317246, -------------- SYN_REPORT ------------
Event: time 1474554377.427249, type 1 (EV_KEY), code 139 (KEY_MENU), value 0
Event: time 1474554377.427249, -------------- SYN_REPORT ------------
</pre>
</pre>

Revision as of 12:27, 22 September 2016

User Buttons

To test any event device, run the following and the available devices will be listed and numbered:

$ evtest

Then, select the device event number you want to test, and use the device - in this case, push the button.

For example, on the VAR-SOM-MX7:

root@imx7-var-som:~# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      30370000.snvs:snvs-powerkey
/dev/input/event1:      ADS7846 Touchscreen
/dev/input/event2:      ft5x06_ts
/dev/input/event3:      gpio-keys
Select the device event number [0-3]: 3
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio-keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 102 (KEY_HOME)
    Event code 139 (KEY_MENU)
    Event code 158 (KEY_BACK)
Properties:
Testing ... (interrupt to exit)
Event: time 1474554375.147272, type 1 (EV_KEY), code 158 (KEY_BACK), value 1
Event: time 1474554375.147272, -------------- SYN_REPORT ------------
Event: time 1474554375.247234, type 1 (EV_KEY), code 158 (KEY_BACK), value 0
Event: time 1474554375.247234, -------------- SYN_REPORT ------------
Event: time 1474554376.217208, type 1 (EV_KEY), code 102 (KEY_HOME), value 1
Event: time 1474554376.217208, -------------- SYN_REPORT ------------
Event: time 1474554376.337219, type 1 (EV_KEY), code 102 (KEY_HOME), value 0
Event: time 1474554376.337219, -------------- SYN_REPORT ------------
Event: time 1474554377.317246, type 1 (EV_KEY), code 139 (KEY_MENU), value 1
Event: time 1474554377.317246, -------------- SYN_REPORT ------------
Event: time 1474554377.427249, type 1 (EV_KEY), code 139 (KEY_MENU), value 0
Event: time 1474554377.427249, -------------- SYN_REPORT ------------