GitHub - twaugh/libieee1284: Parallel port communication library (original) (raw)

libieee1284 README

This library is intended to be used by applications that need to communicate with (or at least identify) devices that are attached via a parallel port.

It currently works on Linux, OpenBSD (i386 only), FreeBSD/i386, Solaris/x86, and Cygwin.

For Linux, there are some wrinkles in communicating with devices on parallel ports:

The aim of this library is to take all the worry about the above wrinkles from the application. It will figure out which method is appropriate for the currently running kernel. For instance, if the application wants to know the device ID of a device on a particular port, it will ask the library for the the device ID. The library will then figure out if it's available via /proc (in any of the possible locations), and if not then it will try asking the device itself. If /dev/parport0 isn't available for use, it will try ioperm; if that fails, it will try /dev/port. And the application doesn't have to care.

The interface is set out in the header file, ieee1284.h, and in the SGML document doc/interface.xml (which can be viewed in HTML format at <http://cyberelk.net/tim/libieee1284/interface/>). If this doesn't do something that you think it should, or it does something in a way that doesn't make sense to you, please let me know so that I can fix it. I need feedback on the interface to know whether it is working.

-- Tim Waugh tim@cyberelk.net