포럼 회원으로 등록하신분만 다운로드가 가능합니다. 최대 업로드 가능한 용량은 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
182 S3C2440용 ARM-LINUX-GCC OABI 툴 체인 패키지 file [3] 김재훈 2009-01-29 14528
181 aesop3차 wince 관련 dnw 사용 방법 입니다. file [3] 류경훈 2008-04-01 14264
180 aesop s3c2440a 3차 보드 wince 6.0 bsp 공개 합니다. file [3] 류경훈 2008-10-20 13925
179 [자료] s3c2440 ac97, amixer 관련 file [1] 강효민 2008-10-02 12337
178 S3C2440용 Legacy NAND(Larger Block) CMD 코드 샘플 file 김재훈 2008-12-11 12337
177 제품출시에 따른 GPL에 관련 사항에 대한 정리 file [3] 고도리 2006-07-02 12218
176 aESOP JTAG file [1] 노희준 2009-03-08 11397
175 aesop-2440 2nd schematic file 고도리 2011-02-08 11364
174 S3C24xx CPU에서 H-JTAG를 이용한 플래시 메모리 퓨징 file [7] 채병철 2009-10-27 11064
173 S3C2440용 ARM-LINUX-GCC OABI Debian Root File System file JhoonKim 2010-01-14 11038
172 aesop3차 보드용 wince 5.0 bsp 입니다 file [6] 류경훈 2008-02-26 10611
171 aesop-2440a 3차보드 회로도를 구합니다. [1] 임의석 2008-04-17 10492
170 [HowTo](수정완료) 이솝보드로 AXD 와 H-JTAG 으로 펌웨어 프로... [20] 이재명 2007-05-23 10332
169 AESOP toolchain에 GDB 포팅하기. 유형목 2007-10-30 9946
168 aesop 2440a 3차 보드에서 sd 카드를 쓰기 위한 수정 입니다. file [4] 류경훈 2008-03-03 9811
167 aesop-2440용 touchscreen input device 지원용 tslib configurati... file 고현철 2008-07-11 9651
166 aesop rootfs 부팅 시 "[: 0: unknown operand" [1] 최승훈 2008-04-19 9556
165 [커널] aesop 1차용 2.4.20 kernel [1] 고현철 2008-04-28 9554
164 제가 aesop2440 3rd 보드에 포팅한 wince 5.0 bsp 입니다. file [3] 이재용 2008-03-25 9480
163 S3C2410 mizi 2.4.18 kernel sound driver fixed file 고도리 2007-11-04 9463

사용자 로그인