nanogui: Setting up TouchScreen for AT91SAM9261-EK
Subject:
Re: [nanogui] Setting up TouchScreen for AT91SAM9261-EK
From:
"Kelvin Xu" ####@####.####
Date:
24 Jan 2007 16:13:20 +0000
Message-Id: <BAY117-F249BA5497FFD444D93FEE7BFAC0@phx.gbl>
Hi,
Thank you for your advice.
I have tried following your advice have to no clear results. The strange
thing i encountered is although using the command: "cat /dev/ts0 > output"
returns 16 bytes for each event.
I encountered the following error:
Wrong number of bytes 8 read from touch panel (expected 16)
Below is a series of output from 4 events on roughly the same point:
4C 1D 9A 00 97 00 CB 00 00 00 9A 00 97 00 B8 0B
4C 1D 9B 00 99 00 F3 23 00 00 9B 00 99 00 14 05
4C 1D 9B 00 99 00 A7 1F 00 00 9B 00 99 00 E4 25
4C 1D 9C 00 9B 00 03 19 00 00 9C 00 9B 00 34 21
My guess is
struct ts_event {
short dummy
short x;
short y;
short pressure;
};
However, the Nano-X only respond to the first event.
Regards,
Kelvin
>From: "Uwe Klatt" ####@####.####
>To: ####@####.####
>Subject: Re: [nanogui] Setting up TouchScreen for AT91SAM9261-EK
>Date: Wed, 24 Jan 2007 07:49:46 +0100
>
>Hello
>>Wrong number of bytes 0 read from touch panel (expected 6)
>>struct ts_event {
>> short pressure;
>> short x;
>> short y;
>>};
>You schould find out the correct device file for your touch and the correct
>amount of bytes for every touch event.
>Try "cat /dev/touch > output" and check the file with hex editor.
>
>Now you should be able to see, how many bytes per event are send..
>
>Here is a example of my touch device...
>
>#define TS_DEVICE_FILE "/dev/misc/tpanel"
>struct ts_event {
> long dummy;
> short x;
> short dummy2;
> short y;
> short pressure;
>};
>
>Bye
>Uwe
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ####@####.####
>For additional commands, e-mail: ####@####.####
>
_________________________________________________________________
Find just what you are after with the more precise, more powerful new
Windows Live Search. http://search.msn.com.sg/ Try it now.