From owner-freebsd-hackers Fri May 28 5:28:16 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from linux.cca.usart.ru (linux.cca.usart.ru [194.226.230.161]) by hub.freebsd.org (Postfix) with ESMTP id F024114D28 for ; Fri, 28 May 1999 05:27:36 -0700 (PDT) (envelope-from max@cca.usart.ru) Received: from localhost (max@localhost) by linux.cca.usart.ru (8.9.1/8.9.1) with SMTP id QAA06932; Fri, 28 May 1999 16:53:53 +0600 Date: Fri, 28 May 1999 16:53:52 +0600 (ESD) From: Max Gotlib To: Chuck Robey Cc: hackers@FreeBSD.ORG Subject: Re: Serial ports programming In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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