From owner-freebsd-hackers Fri Oct 27 6: 2:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 87F4637B479 for ; Fri, 27 Oct 2000 06:02:13 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.9.3) with ESMTP id e9RD2AN10500; Fri, 27 Oct 2000 15:02:10 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Alexander Maret Cc: "'freebsd-hackers@freebsd.org'" Subject: Re: AW: Accessing the tty structure of an opened device In-Reply-To: Your message of "Fri, 27 Oct 2000 14:59:41 +0200." <58A002A02C5ED311812E0050044517F00D2612@erlangen01.atrada.de> Date: Fri, 27 Oct 2000 15:02:10 +0200 Message-ID: <10498.972651730@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <58A002A02C5ED311812E0050044517F00D2612@erlangen01.atrada.de>, Alexa nder Maret writes: >> From: Poul-Henning Kamp [mailto:phk@critter.freebsd.dk] >> Subject: Re: Accessing the tty structure of an opened device >> >> >> >is it possible to access the tty structure of an opened >> >device directly? >> > >> >Background: >> >I'm trying to sense the DCD state of a serial port for >> >getting the pulses and spaces of a simple IR device. >> >> We have some ioctls which allow you to do that, some of them work. >> >> Look in , I belive I have used TIOCMODG() at one >> point in time. > >Thanks for your answer but unfortunately you misunderstood my >intention (probably because of my bad english). >I already saw that I can get the state of the DCD line via >ioctl(). But to really get all pulses and spaces of the IR >device I would have to check DCD continously. What I need >is something to get a signal/intr/wakeup as soon as dcd changes. How fast do these pulses arrive ? Consider using the PPS-API for that: -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | 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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message