nanogui: Problem with touch screen
Subject:
Re: [nanogui] Problem with touch screen
From:
Rakesh ####@####.####
Date:
9 May 2002 09:59:35 -0000
Message-Id: <3CDA312C.23FCDA80@gdatech.co.in>
Hi, Its not hanging or crashing, whenever i m touchinh the screen i am
getting x, y coordinate which i am \printing in the kernel driver code.
####@####.#### wrote:
>
> Hi Rakesh,
>
> You don't actually say what goes wrong, but looking at the code I guess it hangs or crashes?
>
> > static int PD_Read(MWCOORD *px, MWCOORD *py, MWCOORD *pz, int *pb)
> > {
> > /* read a data point */
> > short data[4];
> > int bytes_read;
> > EPRINTF("\n\rInside PD_READ");
> >
> > bytes_read = read(pd_fd, data, 4 * sizeof(data));
> ^^^^^^^^^^^^^^^^
Its not 4 * size of(data) but only sizeof(data)
> I think you mean either "sizeof(data)" or "4 * sizeof(data[0])"?
>
> >
> > if (bytes_read != (4 * sizeof(data))) {
> ^^^^^^^^^^^^^^^^
> And again.
>
> Hope this helps.
>
> Kind regards,
>
> Jon Foster
Thanks & Regards.......
Rakesh