PPI
Daniel O'Connor
doconnor at gsoft.com.au
Sat Feb 25 04:16:22 PST 2006
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20060225/b6e16bc4/attachment.bin
More information about the freebsd-hackers
mailing list