From owner-freebsd-hackers Fri Oct 27 5:59:47 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from hermes.atrada.de (hermes.atrada.de [212.118.32.33]) by hub.freebsd.org (Postfix) with SMTP id B93FC37B479 for ; Fri, 27 Oct 2000 05:59:44 -0700 (PDT) Received: from erlangen01.atrada.de by hermes.atrada.de via smtpd (for hub.FreeBSD.org [216.136.204.18]) with SMTP; 27 Oct 2000 12:59:44 UT Received: (private information removed) Message-ID: <58A002A02C5ED311812E0050044517F00D2612@erlangen01.atrada.de> From: Alexander Maret To: 'Poul-Henning Kamp' Cc: "'freebsd-hackers@freebsd.org'" Subject: AW: Accessing the tty structure of an opened device Date: Fri, 27 Oct 2000 14:59:41 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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. My hope was that I could define a TSA_CARR_OFF and then do a tsleep to get a wakeup as soon as DCD goes down. On DCD down do a tsleep untill it gets up again. Unfortunately to go tsleep and wait for TSA_CARR_OFF/ON I have to get access to the tty structure of my serial port. Thanks for your help, Alex To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message