From owner-freebsd-hackers Fri Oct 27 7:30:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.interware.hu (mail.interware.hu [195.70.32.130]) by hub.freebsd.org (Postfix) with ESMTP id 389FC37B479 for ; Fri, 27 Oct 2000 07:30:48 -0700 (PDT) Received: from mbabane-15.budapest.interware.hu ([195.70.60.143] helo=elischer.org) by mail.interware.hu with esmtp (Exim 3.16 #1 (Debian)) id 13pAWf-0004EH-00; Fri, 27 Oct 2000 16:30:34 +0200 Message-ID: <39F99180.AE1F99E4@elischer.org> Date: Fri, 27 Oct 2000 07:30:24 -0700 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Alexander Maret Cc: 'Poul-Henning Kamp' , "'msmith@mass.osd.bsdi.com'" , "'freebsd-hackers@freebsd.org'" Subject: Re: Accessing the tty structure of an opened device References: <58A002A02C5ED311812E0050044517F00D2614@erlangen01.atrada.de> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alexander Maret wrote: > > > -----Ursprungliche Nachricht----- > > From: Poul-Henning Kamp [mailto:phk@critter.freebsd.dk] > > Subject: Re: Accessing the tty structure of an opened device > > > > 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. > > That's what I wanted to do. I wanted to write a character device > which on read() passes the last IR-code. > > Well as Mike Smith told me: "you cannot poll the serial line at > anything like a useful speed to perform IR decoding" my hopes are > all gone to get a simple solution. > > Do I have to write my own serial driver to get what I want or > is it possible to use functions of the "build in" serial > device driver? look at the pcaudio driver it uses a 16KHz clock to poll out audio.. You can use a similar method to poll in data with little system load.... As for the 'build in' serial driver, it depends on wht your data will look like.... Julian > > Alex > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ presently in: Budapest v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message