From owner-freebsd-hackers Sun Feb 23 17:01:40 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id RAA14496 for hackers-outgoing; Sun, 23 Feb 1997 17:01:40 -0800 (PST) Received: from bastion.seqeb.gov.au (bastion.seqeb.gov.au [147.209.142.2]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id RAA14485 for ; Sun, 23 Feb 1997 17:01:34 -0800 (PST) Received: by bastion.seqeb.gov.au; (5.65/GJW290197a) id AA29670; Mon, 24 Feb 1997 10:59:40 +1000 Received: from proxy.seqeb.gov.au(147.209.206.2) by bastion.seqeb.gov.au via smap (V1.3) id sma032360; Mon Feb 24 10:59:03 1997 Received: by proxy.seqeb.gov.au; (5.65v3.2/GJW290197a) id AA07644; Mon, 24 Feb 1997 10:59:02 +1000 Received: from relay.seqeb.gov.au(147.209.166.6) by proxy.seqeb.gov.au via smap (V1.3) id sma008080; Mon Feb 24 10:58:26 1997 Received: from svbyo4.seqeb.gov.au by un.seqeb.gov.au; (5.65/GJW070297a) id AA28616; Mon, 24 Feb 1997 10:58:16 +1000 Received: by svbyo4.seqeb.gov.au; (5.65/GJW251095a) id AA17259; Mon, 24 Feb 1997 10:58:15 +1000 Date: Mon, 24 Feb 1997 10:58:14 +1000 (EST) From: patrick collins Subject: Re: Device driver cookbook. To: "Brian J. McGovern" Cc: hackers@freebsd.org In-Reply-To: <199702221509.KAA12718@spoon.beta.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I really appreciated your example device driver. Your explanation was very easy to understand and I look forward to further posts on this subject. I am particularly interested in writing a device driver for a digital I/O card I have. This card consists of a couple of 8255 PIO's. I would like my device driver to be able to configure one 8255 for input and the other for output. I would like the device driver to be able to read the inputs every n milliseconds in order to be able to count a 2 Hz pulse train on these inputs. I have a fairly general idea on how to go about this but would appreciate any pointers you might have, especially in the area of how to get the device driver to continually read the input ports without the intervention of the application software. ----------------------------------------------------------------------------- Patrick Collins - Load Survey Technician email : pc012@seqeb.gov.au South East Queensland Electricity Corporation phone : +61 7 3407 5954 Blinzinger Rd, Banyo, 4014 fax : +61 7 3407 5454 Queensland, AUSTRALIA (Best State, Best Country) Viva el Cristo Rey ! -----------------------------------------------------------------------------