From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 25 12:16:21 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E077416A420 for ; Sat, 25 Feb 2006 12:16:21 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A10E343D46 for ; Sat, 25 Feb 2006 12:16:20 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp143-122.lns2.adl2.internode.on.net [59.167.143.122]) (authenticated bits=0) by cain.gsoft.com.au (8.13.5/8.13.4) with ESMTP id k1PCG6LH026315 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Feb 2006 22:46:12 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Sat, 25 Feb 2006 22:45:48 +1030 User-Agent: KMail/1.9.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1423603.AkcVOqVo0C"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200602252245.57500.doconnor@gsoft.com.au> X-Spam-Score: -2.179 () AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.54 on 203.31.81.10 Cc: Steve Olisar Subject: Re: PPI X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2006 12:16:22 -0000 --nextPart1423603.AkcVOqVo0C Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 25 February 2006 04:05, Steve Olisar wrote: > Would it be possible to write a program that uses the parallel port to > listen on the status pins in real time, when the status of a pin changes > the program would read a config file and start/stop processes based on wh= at > is in the config file? ex: if status is either 0 or 1, the status of pin > one changes from 0 to 1 the program would kill a process, start a process > or both. Possible? I know nothing about PPI or programming so I am > willing to pay someone to write this. It doesn=B9t have to be pretty, ju= st > run daemonized and do the job. PPI is pretty easy to use. The ppi(4) man page has a code fragment to get y= ou=20 started. The program you have in mind would be quite easy to write.. Read config, Op= en=20 PPI, Daemonize, poll the parallel port. The only problem is that the parallel port can't capture edges so you would= =20 need to poll fairly frequently if you are trying to capture a button press. =2D-=20 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 --nextPart1423603.AkcVOqVo0C Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBEAEp95ZPcIHs/zowRAr/hAKCCQS+tJhx2yUiYaYDAzui93oJqywCgrIG7 Fdvp0nkFvsNfkeGufIh8kkc= =I5An -----END PGP SIGNATURE----- --nextPart1423603.AkcVOqVo0C--