From owner-freebsd-hackers Thu May 27 11:41: 4 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (Postfix) with ESMTP id C33BF1595B for ; Thu, 27 May 1999 11:41:02 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.3/8.8.8) with ESMTP id LAA01313; Thu, 27 May 1999 11:37:56 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199905271837.LAA01313@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Max Gotlib Cc: hackers@freebsd.org Subject: Re: Serial ports programming In-reply-to: Your message of "Thu, 27 May 1999 11:57:41 +0600." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 May 1999 11:37:56 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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_. > I know about "ioctl(fd, TIOCDRAIN)", but this ioctl > is accomplished with tty buffers draining to (probably) > FIFO buffer of the serial port. Is there any (portable > preferably) way to get an acknolege or to block until > FIFO buffer is cleared? The situation is that I can't > simply write additional 64 bytes (I did not see any > serial ports with FIFO larger than 64 bytes) and > drain the tty buffers - I have to catch the exact > moment ... You could close the device, but that may have an adverse effect on your application, as it will drop DTR. There is no other way, no. -- \\ The mind's the standard \\ Mike Smith \\ of the man. \\ msmith@freebsd.org \\ -- Joseph Merrick \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message