Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Nov 2000 10:55:55 -0700
From:      Warner Losh <imp@village.org>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Alexander Maret <maret@atrada.net>, "'freebsd-hackers@freebsd.org'" <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: AW: AW: Accessing the tty structure of an opened device 
Message-ID:  <200011021755.KAA09361@harmony.village.org>
In-Reply-To: Your message of "Fri, 27 Oct 2000 15:08:34 %2B0200." <10553.972652114@critter> 
References:  <10553.972652114@critter>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <10553.972652114@critter> Poul-Henning Kamp writes:
: >the time between a pulse and a space often only takes
: >a few milliseconds. I have to meassure that with
: >gettimeofday().
: 
: You will need to do this in a device driver, there is no way you
: can reliably measure that from userland.
: 
: Trust me on this: I've tried.

We at timing solutions had a heck of a time measuring timing things in
userland and it became very easy to do it in kernel land.  We used the
parallel port to measure out pulses, but the same pps api that Poul
should work for the serial port as well.

And the advantage of the pps api is that it queues up events (iirc)
and counts them so you know if the buffer overflowed and you missed
any.

Warner


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?200011021755.KAA09361>