포럼 회원으로 등록하신분만 다운로드가 가능합니다. 최대 업로드 가능한 용량은 1GB 입니다.

#include <stdio.h>
#include <stdlib.h>

#include <sys/ioctl.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>

typedef struct {
    unsigned short pressure;  // touch pressure
    unsigned short x;         // calibrated X
    unsigned short y;         // calibrated Y
    unsigned short millisecs; // timestamp of this event
} TS_EVENT;

int tsfd = -1;

int main(void)
{
    TS_EVENT te;
    
    tsfd = open("/dev/touchscreen/0", O_RDONLY);
    if( tsfd < 0 )
    {
        printf("touch driver open errorn");
        return -1;
    }
    
    while(1)
    {
        if (read(tsfd, (void *)&te, sizeof(TS_EVENT)) < 0)
        {
            printf("ts read error");
            return -1;
        }
        
        printf("%d, %d, %d, %dn", te.pressure, te.x, te.y, te.millisecs);
    }
    
    close(tsfd);
}


예전에 aesop 2.4.20으로 배포할때 테스트하던 프로그램입니다.
2.6은 틀린 방식으로 동작하는데, 다른 방법으로 읽어야 하니...이 프로그램으로는
안 읽힐 듯 합니다...^^
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
42 guichan - SDL이용한 gui tool file [1] 고현철 2006-04-12 5721
41 오랜만에 자료를 올려보네요~ㅋㅋㅋ VGA2Composite 관련입니다. file [2] 양용현 2006-12-11 5716
40 aesop 3차 보드 speaker 연결시 reset 현상 잡는 방법 고현철 2006-12-21 5715
39 NFS로 부팅시 RPC return...메세지가 나올때. 권성현 2006-12-22 5711
38 Vmware에서 Fedora 설치하기 file 방창혁 2006-05-12 5710
37 터치 clibration application을 약간 수정 file [1] 김진성 2007-04-29 5706
36 이솝 3차보드에 mplayer 포팅하기. file [2] 유태경 2006-12-29 5705
35 리셋회로입니다. file [1] 박영학 2006-11-16 5704
34 aesop에 쓰인 삼성 4" 480x272 LCD datasheet file 고현철 2006-06-24 5701
33 김유석님의 camdriver를 aesop-2440 kernel을 이용 컴파일 한 것 file [5] 고현철 2007-04-07 5697
32 iMX21 ADS용 Ext_uart 드라이버.. 커널 2.4 file 김경호 2006-11-14 5694
31 리눅스커널2.6 포팅자료 .... file [3] 장석원 2006-09-25 5693
30 aesop 3차용 smsc91c113 driver만 발췌한 것 file [1] 고현철 2006-12-13 5687
29 커널 2.4에서 수정된 터치드라이버 file [1] 김진성 2007-04-29 5680
28 hpipaqh1940 kernel 2.6.13 patch file [6] 고현철 2007-02-26 5678
» S3C2410/2440 2.4.x용 touch test program 고현철 2006-11-28 5675
26 이솝용 X-win RootFS 파일입니다. 이제현 2006-12-20 5674
25 aesop logo 올립니다. file 고현철 2007-03-15 5674
24 QTE-3.3 에 TSLIB-1.3 연동시키기 file [1] 문철민 2007-03-21 5673
23 inetutils-1.4.2 file 고현철 2006-05-25 5672

사용자 로그인