On Tuesday 28 August 2001 12:48, you wrote:
> I have a side project that I need to write a touchscreen driver
> for. I was wondering, would it be easier to modify the existing
> helio touchscreen driver to suit my needs or just writing the whole
> thing from scratch.  I currently can access the touchscreen, and I
> wrote a simple C app to display the X,Y coordinates when that
> location is touched.  The problem is that I have a 48X64 matrix
> with the lower left corner is 0,0... so the translation to screen
> coordinates is going to be blocky, which is fine as I'm not
> interested in doing anything but clicking on buttons.
>
> anyone have any pointers on how to go about writing a Pgserver
> driver?

Something like...:
sane_coords(struct tpcoords* t) {
        t->y=(~t->y)&0x3f;
}
should work.  (From memory, so please don't take my word for it :)

Now you have a 0,0 at the top left :).  This is very common in 
hardware to have the origin in some weird corner, usually you do this 
kind of translation in the kernel to the more natural style of 0,0 in 
the top left, but sometimes people feel like userspace should do it.  
(Psion5mx works the same way, but I put the switch-a-roo code in the 
kernel)

Thanks,
Shane Nay.

_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to