Messages in this thread | | | Date | Tue, 26 Aug 2003 09:47:17 +0100 | From | Russell King <> | Subject | Re: 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/
| |