Date: Wed, 10 Nov 1999 01:11:57 -0800 (PST) From: Alfred Perlstein <bright@wintelcom.net> To: Mike Nowlin <mike@argos.org> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: serial (std & rocketport) ioctl? Message-ID: <Pine.BSF.4.05.9911100109290.12797-100000@fw.wintelcom.net> In-Reply-To: <Pine.LNX.4.05.9911100308210.5800-100000@jason.argos.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 10 Nov 1999, Mike Nowlin wrote: > > Hate to sound like a bum, but I haven't figured out enough of the kernel > to answer this one for myself..... :) > > Topic: serial driver > > We have an application that sends (not receives) data to a serial port to > a set of brain-dead analyzers (and other stuff). For several reasons I > don't feel motivated enough to get into here, we can't send data to more > than one at a time. > > Under Linux, there's an ioctl() you can call (don't remember which one) to > ask the kernel if the port in question has actually completed sending the > data that has been sent to it. Last time I checked, this only worked for > the 8250 family of parts, and not the more "advanced" boards like Cyclades > & RocketPort -- that ioctl didn't exist for these boards. So, I was stuck > using standard serial boards, and using this ioctl to wait for one > transmission to complete before starting another one to a different port. > > Is there anything like this under FreeBSD? The Linux machine is on its > way out (kernel version 1.2.8(!), plus failing hardware), and we've added > more equipment -- I'd love to use a Cyclades or RP board for this, instead > of lots of modified serial cards, and I've been using more and more > FreeBSD for the machines at work... (Don't get me wrong - I love Linux, > but I trust FreeBSD more for what we do at work -- medical testing.) We like FreeBSD as well. :) I'm not a serial expert, but maybe the direction you need to take is looking at /usr/include/sys/ttycom.h, several ioctl's seem to be what you're looking for, noteably: #define TIOCDRAIN _IO('t', 94) /* wait till output drained */ maybe that's incorrect, but i'm sure one or a combination of a few ioctls from that header will help you out. good luck, -Alfred 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.BSF.4.05.9911100109290.12797-100000>