Re: AW: AW: Accessing the tty structure of an opened device

2000-11-02 Thread Poul-Henning Kamp

In message <[EMAIL PROTECTED]>, Warner Losh writes:

>
>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.

Sorry: not it doesn't.

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: AW: AW: Accessing the tty structure of an opened device

2000-11-02 Thread Warner Losh

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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: AW: AW: Accessing the tty structure of an opened device

2000-10-27 Thread Poul-Henning Kamp

In message <[EMAIL PROTECTED]>, Alexa
nder Maret writes:
>> From: Poul-Henning Kamp [mailto:[EMAIL PROTECTED]]
>> Subject: Re: AW: Accessing the tty structure of an opened device 
>> 
>> 
>> How fast do these pulses arrive ?  Consider using the
>> PPS-API for that: 
>> 
>
>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.

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



AW: AW: Accessing the tty structure of an opened device

2000-10-27 Thread Alexander Maret

> From: Poul-Henning Kamp [mailto:[EMAIL PROTECTED]]
> Subject: Re: AW: Accessing the tty structure of an opened device 
> 
> 
> How fast do these pulses arrive ?  Consider using the
> PPS-API for that: 
> 

the time between a pulse and a space often only takes
a few milliseconds. I have to meassure that with
gettimeofday().

Greetings,
Alex


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message