lkml.org 
[lkml]   [2003]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Reading accurate size of recepts from serial port
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.055 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site