전자부품 데이터시트 검색엔진
  Korean  ▼
ALLDATASHEET.CO.KR

X  

AN4503 데이터시트(PDF) 14 Page - STMicroelectronics

부품명 AN4503
상세설명  This application note provides guidelines for successfully integrating
PDF  26 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
제조업체  STMICROELECTRONICS [STMicroelectronics]
홈페이지  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4503 데이터시트(HTML) 14 Page - STMicroelectronics

Back Button AN4503 Datasheet HTML 10Page - STMicroelectronics AN4503 Datasheet HTML 11Page - STMicroelectronics AN4503 Datasheet HTML 12Page - STMicroelectronics AN4503 Datasheet HTML 13Page - STMicroelectronics AN4503 Datasheet HTML 14Page - STMicroelectronics AN4503 Datasheet HTML 15Page - STMicroelectronics AN4503 Datasheet HTML 16Page - STMicroelectronics AN4503 Datasheet HTML 17Page - STMicroelectronics AN4503 Datasheet HTML 18Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 14 / 26 page
background image
Linux kernel space
AN4503
14/26
DocID026411 Rev 2
Then run the command: "make modules" from <KR>.
The built hts221.ko, lps25.ko and uv.ko modules, located under <KR>/drivers/misc are then
placed in the Android filesystem with the usual procedure:
 [RAS]$ adb push [modulename].ko /system/lib/hw
They can then be installed and rendered functional:
 [RAS]$ adb shell
[Android shell]$ insmod /system/lib/hw/[modulename].ko
3.2.2
Controlling the device drivers from Linux user space
The device can be controlled from Linux user space by writing the desired settings (integer
values) to the relevant control files from the shell using the proper 'echo' command, or inside
the libs or applications.
The above mentioned files are located under
"/sys/class/input/input[x]/device/<busnum>/<i2c-address>/", where busnum is the bus
number ('4' in this test case with the PandaBoard) and the i2c-address changes according
to the device in use:
hts221 : 004f
lps25h : 005d
uvis25 : 0047
The names of these control files can be found in the corresponding .c file of the driver,
specifically in the struct “attributes”.
The most important file is the 'enable_device'. In this example, the complete path for the
lps25h in our Panda-board test environment is:
"/sys/class/input/input[x]/device/4/<4-005d/enable_device"
Configure this to '1' to set the device ON, and to '0' (zero) to set it OFF.
To set the device ON or OFF from the 'Linux user space', use the following commands:
 [Android shell]$ echo 1 > /sys/class/input/input[x]/device/<busnum>/<i2c-
address>/enable_device
 [Android shell]$ echo 0 > /sys/class/input/input[x]/device/<busnum>/<i2c-
address>/enable_device
Alternatively:
 [Android shell]$ echo 1 > /sys/bus/i2c/devices/<busnum>/<i2c-address>/enable_device
 [Android shell]$ echo 0 > /sys/bus/i2c/devices/<busnum>/<i2c-address>/enable_device
The devices can be controlled through <sysfs_interface>:
 /sys/bus/i2c/devices/<busnum>/<i2c-address>/
and other features can be set as well as ON and OFF.
For example, consider lps25h to change the FIFO setting.
Recall that the FIFO modes are:



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26


데이터시트 다운로드

Go To PDF Page


링크 URL



ALLDATASHEET 가 귀하에 도움이 되셨나요?  [ DONATE ] 

Alldatasheet는?   |   광고문의   |   운영자에게 연락하기   |   개인정보취급방침   |   링크 투 데이터시트    |   링크교환   |   제조사별 검색
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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