포럼 회원으로 등록하신분만 다운로드가 가능합니다. 최대 업로드 가능한 용량은 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

guichan - SDL이용한 gui tool file [1]

오랜만에 자료를 올려보네요~ㅋㅋㅋ VGA2Composite 관련입니다. file [2]

aesop 3차 보드 speaker 연결시 reset 현상 잡는 방법

Vmware에서 Fedora 설치하기 file

NFS로 부팅시 RPC return...메세지가 나올때.

터치 clibration application을 약간 수정 file [1]

이솝 3차보드에 mplayer 포팅하기. file [2]

리셋회로입니다. file [1]

aesop에 쓰인 삼성 4" 480x272 LCD datasheet file

김유석님의 camdriver를 aesop-2440 kernel을 이용 컴파일 한 것 file [5]

iMX21 ADS용 Ext_uart 드라이버.. 커널 2.4 file

리눅스커널2.6 포팅자료 .... file [3]

aesop 3차용 smsc91c113 driver만 발췌한 것 file [1]

커널 2.4에서 수정된 터치드라이버 file [1]

hpipaqh1940 kernel 2.6.13 patch file [6]

S3C2410/2440 2.4.x용 touch test program

이솝용 X-win RootFS 파일입니다.

aesop logo 올립니다. file

QTE-3.3 에 TSLIB-1.3 연동시키기 file [1]

inetutils-1.4.2 file

사용자 로그인