how to talk to the serial and parallel ports through a C

Olivier Nicole Olivier.Nicole at
Wed Jun 11 23:44:20 PDT 2003

I'll reply on the parallel port:

fd_relay=open("/dev/ppi0", O_WRONLY);
ioctl(fd_relay, PPISDATA, value)

Value being an 8 bits value.

That works wonders with the relay card from Quality Kits

As for the entry, as I only needed 2 contacts, I used mouse button
(plus it provides a nice testing interface, just click on your mouse
buttons :)


More information about the freebsd-questions mailing list