parallel port access on Linux

Jecel Assumpcao Jr jecel at merlintec.com
Fri Feb 3 20:57:05 UTC 2006


Cees De Groot wrote on Fri, 3 Feb 2006 19:28:45 +0100
> I have some C++ code that works under Linux, but I only used that to
> drive a couple of relays attached to the parallel port.
> http://www.cdegroot.com/photo-linuxdr/ - maybe not exactly what you're
> looking for, but it might just contain enough hints :)

Cute, thanks for sharing this!

This approach (run as root, code i/o instructions in assembly) could
work if I used Exupery, but that requires a special VM and if I am going
to have that I might as well add some primitives or something like that.

For just setting the pins on the parallel port to some value it seems
that normal file operations on /dev/lp0 would be good enough:
http://people.redhat.com/twaugh/parport/html/ppdev.html

For a more detailed control we would need the ioctl() system call with
/dev/parport0 and that is something that, as far as I know, Squeak can't
do. Is this planned as part of the great file reform?

-- Jecel



More information about the Squeak-dev mailing list