| поискавой системы для электроныых деталей |
|
AN4503 датащи(PDF) 16 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4503 датащи(HTML) 16 Page - STMicroelectronics |
|
16 / 26 page ![]() Linux kernel space AN4503 16/26 DocID026411 Rev 2 3.3 Permission setting The permission of some files in the ramdisk.img should be specifically set by adding some lines to the relevant init.<board>.rc file (for the Panda-board, the file init.omap4pandabpard.rc located in <RAS>/device/ti/panda). In particular: chmod 0666 /sys/class/input/input<x>/device/device/enable_device chown system system /sys/class/input/input<x>/device/device/enable_device chmod 0666 /sys/class/input/input<x>/device/device/full_scale chown system system /sys/class/input/input<x>/device/device/full_scale chmod 0666 /sys/class/input/input<x>/device/device/poll_period_ms chown system system /sys/class/input/input<x>/device/device/poll_period_ms where <x> is the 'number' corresponding to the proper event. After modifying the above mentioned file, run "make bootimage" from <RAS> to build the new boot.img. This new image, which includes the kernel (zImage in <KR>/arch/arm/boot) and the ramdisk.img, can be found in <RAS>/device/ti/panda. 3.4 Output data from the driver 3.4.1 Where to find the data The Linux infrastructure provides the raw data from the driver in the assigned /dev/input/event<x> devices (see the routine <device>_report_values, where <device> is the name of the device, hts221 or lps25h or uvis). This data can be accessed with the corresponding command from the Linux shell [Android shell]$ getevent /dev/input/event<x> The real values (read from the device or calculated) can also be read as real values via the Minicom for debugging purposes only. Do this by enabling #DEBUG in the corresponding driver and then read the data through pr_info in hts221_get_data() or lps25_prs_get_presstemp_data(). 3.4.2 Sample application for reading data The data exported in /dev/event/input<X> can also be read with a simple algorithm in the C language, in a dynamic library or directly from an application. Below is a simple skeleton, where argv[1] is the path: /dev/input/event #include <stdio.h> #include <time.h> #include <sys/times.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <stdint.h> #include <assert.h> |
|
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |