포럼 회원으로 등록하신분만 다운로드가 가능합니다. 최대 업로드 가능한 용량은 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 iconv install howto with aesop-2440 toolchain 고현철 2007-05-01 6043
41 autologin source. [1] 고현철 2007-05-04 5751
40 [팁] aesop-2440 에서 ssh server 돌리기 [8] 유형목 2007-05-11 6842
39 smsc91c113 aesop-2440 3차용 2.4.20 driver file [2] 고현철 2007-05-17 5832
38 SDL TTF를 이용한 한글 display 예제..... file [4] 고현철 2007-05-17 5998
37 [HowTo](수정완료) 이솝보드로 AXD 와 H-JTAG 으로 펌웨어 프로... [20] 이재명 2007-05-23 10332
36 aEsop JTAG(Byte Blaster MV) 로도 잘되네요 file [3] 윤광윤 2007-05-24 6046
35 2.4 Kernel Logo 변환 소스입니다.(코어벨참조) file [2] 김현기 2007-05-24 6047
34 Install Quickcam Pro 4000 driver for aesop file [1] 노희준 2007-06-07 5866
33 SDL 기본 화면 띄우기 입니다. file [2] 최현진 2007-06-07 5922
32 S3C2440 24bpp framebuffer driver source file [1] 고현철 2007-06-21 6047
31 [re] S3C2440 24bpp framebuffer driver source 김민식 2007-06-21 5877
30 aesop2440용 cuteos 입니다. file [4] 전병우 2007-06-27 5883
29 [HowTo] scratchbox설치에서 qtopia까지 삽질기 file [13] 안경식 2007-06-27 7192
28 [3차보드] JTAG 회로 관련 문제. [6] 유용출 2007-08-16 6448
27 이솝보드에서 NTFS HDD 인식시키고 읽기와 쓰기 ( fuse, ntfs-3g... [2] 이영재 2007-08-21 9370
26 [HowTo] 이솝보드에 무선 랜 카드 동작시키기 (무선 칩 : RT2... [9] 이영재 2007-09-13 8886
25 aesop-2440용 GNUBOY source file [1] 고현철 2007-09-19 5856
24 SPI 자료 file [2] 이재훈 2007-09-20 6053
23 linux kernel 2.6 kthread example file 고현철 2007-10-12 6752

사용자 로그인