From: Oliver Neukum <oliver@neukum.org>
To: Ondrej Zary <linux@rainbow-software.org>,
linux-usb-devel@lists.sourceforge.net
Cc: daniel.ritz@gmx.ch, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [resend] IRTOUCHSYSTEMS support for usbtouchscreen
Date: Tue, 3 Jul 2007 08:07:46 +0200 [thread overview]
Message-ID: <200707030807.46630.oliver@neukum.org> (raw)
In-Reply-To: <200707022319.57322.linux@rainbow-software.org>
Am Montag, 2. Juli 2007 schrieb Ondrej Zary:
> + * IRTOUCH Part
> + */
> +#ifdef CONFIG_TOUCHSCREEN_USB_IRTOUCH
> +static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
> +{
> + dev->x = (pkt[3] << 8) | pkt[2];
> + dev->y = (pkt[5] << 8) | pkt[4];
> + dev->touch = (pkt[1] & 0x03) ? 1 : 0;
> +
> + return 1;
> +}
> +#endif
> +
Your description says the higher order byte comes first.
And could you use le16_to_cpu() rsp. be16_to_cpu() to read the values?
It is easier to read.
Regards
Oliver
prev parent reply other threads:[~2007-07-03 6:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-02 21:19 Ondrej Zary
2007-07-03 6:07 ` Oliver Neukum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200707030807.46630.oliver@neukum.org \
--to=oliver@neukum.org \
--cc=daniel.ritz@gmx.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=linux@rainbow-software.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®