From: Russell King <rmk@arm.linux.org.uk>
To: "Laurent Hugé" <laurent.huge@wanadoo.fr>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Reading accurate size of recepts from serial port
Date: Tue, 26 Aug 2003 09:47:17 +0100 [thread overview]
Message-ID: <20030826094717.A13415@flint.arm.linux.org.uk> (raw)
In-Reply-To: <200308261032.13576.laurent.huge@wanadoo.fr>; from laurent.huge@wanadoo.fr on Tue, Aug 26, 2003 at 10:32:13AM +0200
On Tue, Aug 26, 2003 at 10:32:13AM +0200, Laurent Hugé wrote:
> I feel sorry to annoy you again with my problem, but I can't imagine there is
> no way to know the accurate size of a recept on the serial port.
The serial driver can not and does not know in advance how many characters
the other is going to send. As far as the serial driver is concerned, it's
just a meaningless stream of characters.
To give an example, if your device sends the following character stream:
first last
v v
.....................................................
your line discipline may receive this as four separate blocks:
................ block 1
................ block 2
................. block 3
.... block 4
It may not receive it like the above - it may be several blocks of 8
characters or whatever, depending on the UARTs FIFO, interrupt load,
etc.
There is just no way for the serial driver itself to batch them back
up.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2003-08-26 8:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-26 8:32 Reading accurate size of recepts from serial port Laurent Hugé
2003-08-26 8:47 ` Russell King [this message]
2003-08-26 13:39 ` Laurent Hugé
2003-08-26 14:22 ` Stuart MacDonald
2003-08-26 15:23 ` Laurent Hugé
2003-08-27 14:50 ` Herbert Pötzl
2003-08-27 16:53 ` Laurent Hugé
2003-08-27 17:17 ` Richard B. Johnson
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=20030826094717.A13415@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=laurent.huge@wanadoo.fr \
--cc=linux-kernel@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