From owner-freebsd-hackers Sun Sep 30 8:38:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 2C73C37B409 for ; Sun, 30 Sep 2001 08:38:26 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.4/8.11.4) with ESMTP id f8UFcLv03804; Sun, 30 Sep 2001 17:38:21 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Bart Kus Cc: hackers@FreeBSD.ORG Subject: Re: sio modification In-Reply-To: Your message of "Sun, 30 Sep 2001 10:10:04 CDT." <200109301003.06903@EO> Date: Sun, 30 Sep 2001 17:38:21 +0200 Message-ID: <3802.1001864301@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200109301003.06903@EO>, Bart Kus writes: > Hello, I'm wondering about a seemingly simple sio.c modification. The >problem stems from me wanting to use this dang remote control receiver, which >manipulates the CD line of the serial port it plugs into. Afaik, the UART >itself is capable of generating an interrupt whenever CD changes. The >problem is, sio.c doesn't support this feature. I'm stuck with polling the >status register to find out the state of CD. Not a very good solution for a >daemon that's supposed to run in the background all the time, especially >since the CD line will be toggled at about 40kHz (I think that's the remote >control frequency standard). Perhaps I'm wrong about the 40kHz figure. Your machine will not work too well if it is 40kHz. The PPS-API allows you to timestamp edges on DCD, if the frequency is more reasonable, that would work for you. Find RFC27xx for more info about PPS-API. -- 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