Date: Mon, 6 Dec 2004 11:41:21 +1030 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: freebsd-stable@freebsd.org Cc: Hannes Mayer <h.mayer@inode.at> Subject: Re: Parallel Port Interrupt Handler in Kernel Module Message-ID: <200412061141.21490.doconnor@gsoft.com.au> In-Reply-To: <41B32A1F.9000205@inode.at> References: <41B32A1F.9000205@inode.at>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Mon, 6 Dec 2004 02:02, Hannes Mayer wrote: > I'm trying to capture the parallel port interrupt in a kernel module. > First I compiled the "skeleton" from: > http://freebsd.active-venture.com/arch-handbook/driverbasics-kld.html > and it works well. > > Then I googled on how to setup the interrupt handler, also looked at > the device driver sources of the parallel port driver and I found > that BUS_SETUP_INTR is used to setup the handler. I would suggest looking at existing drivers, there's plenty of working example code 8-) In FreeBSD there is a parallel port abstraction called ppbus (man 4 ppbus) which allows different drivers to access the parallel port. Examples of code that uses ppbus are lpt, vpo, ppi, pps. I would say the ppi driver is probably a good place to start looking as it's just a "geek port", and hence isn't very complex. I just kludged up a version of ppi that you can build outside the tree and allows you to load and unload (although I haven't actually _tested_ it apart from load and unload :) http://www.gsoft.com.au/~doconnor/pphack.tgz -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBs7G55ZPcIHs/zowRAsGlAKCmI3XOnGu0dzkAr+h9b8xnjr5g9ACgkxPJ sRcITEOGrOzdvFc3JNELz40= =tYJC -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412061141.21490.doconnor>
