Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Feb 2006 22:45:48 +1030
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        freebsd-hackers@freebsd.org
Cc:        Steve Olisar <solisar@nextmediagroup.net>
Subject:   Re: PPI
Message-ID:  <200602252245.57500.doconnor@gsoft.com.au>
In-Reply-To: <C0249FF1.4A92%solisar@nextmediagroup.net>
References:  <C0249FF1.4A92%solisar@nextmediagroup.net>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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 what
> 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ąt have to be pretty, just
> run daemonized and do the job.

PPI is pretty easy to use. The ppi(4) man page has a code fragment to get you 
started.

The program you have in mind would be quite easy to write.. Read config, Open 
PPI, Daemonize, poll the parallel port.

The only problem is that the parallel port can't capture edges so you would 
need to poll fairly frequently if you are trying to capture a button press.

-- 
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.4.2 (FreeBSD)

iD8DBQBEAEp95ZPcIHs/zowRAr/hAKCCQS+tJhx2yUiYaYDAzui93oJqywCgrIG7
Fdvp0nkFvsNfkeGufIh8kkc=
=I5An
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602252245.57500.doconnor>