Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 May 1999 16:53:52 +0600 (ESD)
From:      Max Gotlib <max@cca.usart.ru>
To:        Chuck Robey <chuckr@picnic.mat.net>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Serial ports programming
Message-ID:  <Pine.LNX.3.95.990528163613.6660C-100000@linux.cca.usart.ru>
In-Reply-To: <Pine.BSF.4.10.9905271054580.375-100000@picnic.mat.net>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, 27 May 1999, Chuck Robey wrote:
> On Thu, 27 May 1999, Max Gotlib wrote:
> 
> > Hi!
> > 
> > Some days ago I've faced with the following problem:
> > I need some kind of action (while coding user space
> > program actively handling the serial port) to get
> > sure all the bytes I've wrote to it are _transmitted_.
> 
> The rate that characters drain from a UART is determined by the
> currently active bit rate AND the absence of any change in the DTR and
> CTS lines.  You can sleep the time involved in transmitting the
> characters.  You can set up to be notified of any changes in the state
> of the DTR and CTS lines, from the driver, and do that portably too
> (signals).  As long as you don't get a signal to indicate the change,
> and you wait the time period it takes to drain the fifo, then you can
> rely on the fact that the UART is drained.

Hmmm... Digged into sio/tty* sources, I did not find a way to be
woken up on CTS assertion... I know, I'm far from being called
unix kernel guru. And a question: HOW ?

Thanks in advance,
Max.
 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.95.990528163613.6660C-100000>