Re: Serial port buffering?
- From: "Binary" <binary.chen@xxxxxxxxx>
- Date: 28 Oct 2006 18:47:31 -0700
Grant Edwards wrote:
On 2006-10-28, Charles Sullivan <cwsulliv@xxxxxxxxxxxx> wrote:
Do the standard RS232 serial port drivers in Linux/Unix
provide any buffering of received characters other than
whatever hardware buffers are in the UART?
Yes. The last time I looked, they provde 1 page buffers for
both rx and tx (on an IA32 machine, that's 4KB).
I'm wondering how to handle the situation where a burst
of perhaps several hundred characters arrives at the
serial port (with no flow control) and a process can't
wait for them all to arrive before starting what may be
a relatively time-consuming analysis. (Assuming that
the analysis can be completed before another burst
arrives.)
It should be fine unless you let more than 4K of unread bytes
get queued up -- then data gets dropped.
The flip buffer is only 512 bytes, the N_TTY buffer is 4K, so I think
its better to rely on flip buffer which is 512 byte.
--
Grant Edwards grante Yow! Is this an out-take
at from the "BRADY BUNCH"?
visi.com
.
- Follow-Ups:
- Re: Serial port buffering?
- From: Grant Edwards
- Re: Serial port buffering?
- References:
- Serial port buffering?
- From: Charles Sullivan
- Re: Serial port buffering?
- From: Grant Edwards
- Serial port buffering?
- Prev by Date: Re: Serial port buffering?
- Next by Date: How and when to use recursive mutex
- Previous by thread: Re: Serial port buffering?
- Next by thread: Re: Serial port buffering?
- Index(es):
Relevant Pages
|
|