[fpc-pascal]How to access a parallel port?

Rainer Hantsch rainer at hantsch.co.at
Mon Jan 5 14:05:50 CET 2004


I want to acces a parallel port (in Linux) from FPC 1.0.4 to control a
connected LCD display. I did such things in DOS with TP/BP by accessing the
hardware of the port directly, but this seems to be a little bit too close to
the hardware in linux. Instead, I would like to access the parallel port
through its device (i.e. /dev/lp0) and with some ioctrl() calls to access the
handshake lines, too.

Should normally be no problem, but I have no idea where to start.

Does anybody have a sample code for that? Also, a easy to understand
documentation of all parallel-port ioctrl() functions would be helpful.


  Ing. Rainer Hantsch

|      \\|//              Ing. Rainer HANTSCH  -  Hardware + Software |
|      (o o)        Service - Support - WEB-Design und Programmierung |
| Ing. Rainer HANTSCH |  mail: office at hantsch.co.at                   |
| Khunngasse 21/20    |   www: http://www.hantsch.co.at               |
| A-1030 Vienna       |   tel: +43-1-79885380    fax: +43-1-798853818 |
| ** A u s t r i a ** | handy: +43-664-9194382   UID-Nr: ATU 11134002 |

More information about the fpc-pascal mailing list