linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarod Wilson <jarod@redhat.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Chaogui Zhang <czhang@marywood.edu>, linux-input@vger.kernel.org
Subject: Re: [PATCH] TiVo USB IR Dongle support
Date: Wed, 13 Jan 2010 09:25:09 -0500	[thread overview]
Message-ID: <4B4DD7C5.3020704@redhat.com> (raw)
In-Reply-To: <20100113075308.GB3242@core.coreip.homeip.net>

On 1/13/10 2:53 AM, Dmitry Torokhov wrote:
> Hi Chaogui,
> 
> I was looking at the driver again and I have some concerns with the
> foolowing fragment:
> 
> On Tue, Dec 15, 2009 at 07:53:57PM -0500, Chaogui Zhang wrote:
>> +
>> +	/* The lower 5 bits of the first byte of each packet indicates the size
>> +	 * of the transferred buffer, not including the first byte itself.
>> +	 */
>> +
>> +	length = (remote->in_buffer[0]) & 0x1f;
>> +	for (i = 0; i <= length; i++)
>> +		snprintf(codes + i * 3, 4, "%02x ", remote->in_buffer[i]);
>> +
>> +	/* 0x80 at the end of a regular packet or in a separate packet
>> +	   indicates key release */
>> +
>> +	if (i < TIVOIR_RECV_SIZE && remote->in_buffer[i] == 0x80)
>> +		snprintf(codes + i * 3, 4, "%02x ", remote->in_buffer[i]);
>> +
> 
> So does this mean that 0x80 indicating release is not included in the
> size of the received packet.

This receiver is essentially identical to all the windows media center
transceivers out there (and can in fact be driven as such by simply
adding its device id to the lirc_mceusb driver). They all signal the
start of an incoming packet with an 0x8y header byte, where y is the
number of bytes contained in the packet following the header (but
excluding the header). So the empty packet 0x80 is used to signal the
end of a transmitted IR command.


-- 
Jarod Wilson
jarod@redhat.com

  reply	other threads:[~2010-01-13 14:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-06 21:45 [PATCH] TiVo USB IR Dongle support Chaogui Zhang
2009-12-12 19:01 ` Chaogui Zhang
2009-12-12 23:32   ` Dmitry Torokhov
2009-12-14 22:00     ` Chaogui Zhang
2009-12-14 22:28       ` Dmitry Torokhov
2009-12-16  0:53         ` Chaogui Zhang
2010-01-13  7:53           ` Dmitry Torokhov
2010-01-13 14:25             ` Jarod Wilson [this message]
2010-01-14  1:22             ` Chaogui Zhang
2010-01-14  1:28               ` Chaogui Zhang

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=4B4DD7C5.3020704@redhat.com \
    --to=jarod@redhat.com \
    --cc=czhang@marywood.edu \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).