Date: Mon, 14 Mar 2005 19:38:47 -0800 From: Bruce M Simpson <bms@spc.org> To: Matt Kory <uber.caulker@gmail.com> Cc: freebsd-hackers@FreeBSD.org Subject: Re: poll or select for ppi? Message-ID: <20050315033847.GA8085@empiric.icir.org> In-Reply-To: <5e52cc0005031419056fdf10c6@mail.gmail.com> References: <5e52cc0005031419056fdf10c6@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 14, 2005 at 10:05:34PM -0500, Matt Kory wrote: > Is it possible to use poll or select to detect a change in the status > bits of the parallel port? I tried something like this, and took bits > 5 and 6 of the status register low and nothing seemed to happen. Is > what I am trying to do even possible, or I am supposed to take a > certain bit low to cause a read event? Any help is appreciated. Disclaimer: I'm no expert on the parallel port. The man page for ppi(4) says that all I/O is via ioctl(), which isn't covered by the select() mechanism. You'd either have to poll PPIGSTATUS from userland on a timer, or perhaps hack the driver to use a kevent. Considering there's probably no way to get a hardware interrupt for the status change directly via ppi(4), you might need to consider writing a set of custom ppbus microsequences and a driver for your application. Regards, BMS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050315033847.GA8085>