nabla <nablaone_nospam@o2.pl> wrote:
+---------------
| Frank Sergeant wrote:
| > I am accessing a relay board attached to a Linux x86 box using CLISP.
| > The relay board has 8 relays. Each relay is controlled by one of the 8
| > data bits on the parallel port.
|
| You should use /dev/parport device. See 7.3 section from
| http://www.kernelnewbies.org/documents/kdoc/parportbook.pdf.
+---------------
Or for FreeBSD, /dev/ppi{N}, the user-space interface to the ppbus
parallel 'geek' port, may be more convenient and/or flexible. From
"man 4 ppi":
The ppi driver provides a convenient means for user applications
to manipulate the state of the parallel port, enabling easy
low-speed I/O operations without the security problems inherent
with the use of the /dev/io interface.
However, if that's not good enough, /dev/io is always an option.
+---------------
| Direct IO access from userland it's not the *nix way.
+---------------
I beg to differ!! I have been doing direct I/O access from user mode
under various flavors of Unix since 1981! ...and from within Scheme
or Common Lisp under Unix since 1992 -- including doing DMA to/from
(pinned) user pages. It can be a *very* effective way to do hardware
debugging and/or driver development.
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607