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

X  

AN4503 데이터시트(PDF) 17 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) 17 Page - STMicroelectronics

Back Button 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 AN4503 Datasheet HTML 19Page - STMicroelectronics AN4503 Datasheet HTML 20Page - STMicroelectronics AN4503 Datasheet HTML 21Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 17 / 26 page
background image
DocID026411 Rev 2
17/26
AN4503
Linux kernel space
26
struct input_event {
struct timeval time;
uint16_t type;
uint16_t code;
int32_t value;
};
int main(int argc, char *argv[])
{
int fd;
struct input_event ev;
assert(16 == sizeof(struct input_event));
if (argc != 2) {
fprintf(stderr, "missing /dev/input/XXX\n");
return 1;
}
if ((fd = open(argv[1], O_RDONLY)) == -1) {
perror("open");
return 1;
}
while (1) {
do
{
read(fd, &ev, sizeof(struct input_event));
if (ev.type == EV_ABS)
printf("type:%u code:%u value:%d\n", ev.type, ev.code, ev.value);
usleep(500000);
/* 2 reads per sec */
} while (ev.type != EV_SYN);
}
close(fd);
return 0;
}
Type, time, code and value correspond to the numbers that fill the shell when the getevent
command is launched.
In our example, it can be seen that the types for the pressure (abs_pr), temperature (chosen
as abs_gas) and humidity (chosen as abs_misc) are respectively: 18, 09 and 28.



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