Well, if you have ever attempted to write a device driver for any operating system, no matter how simple the device, if it is your first attempt at writing such a beast, you know it isn't easy. Well, this wasn't particularly easy, but there is plenty of documentation on writing parallel port device drivers and the documentation for doing so under Linux is becoming increasingly better. Due to the proliferation of parallel port devices, the format of the parport drivers under Linux has changed since the 2.0 kernels to make it particularly easy to write such drivers. I was asked to do a presentation on my project and will get that on my site soon. I wrote my driver primarily for the four port version, but was only able to test it using the two port version. I was able to get pretty fantastic results, with printers attached to both ports printing simultaneously. However, I never got past the stage of testing them with just plain text output on dot matrix printers. I never tested them with graphics capabilities or on ink jet or laser printers. Additionally, the timing is probably pretty well tuned to the machine I was testing it on, a high end 486 of some sort and may not work too well on a higher end machine. My next objectives for this driver are to set up an interrupt handler so that it will handle data more quickly and to create an ioctl interface to lock out or lock in a port.
Where's the code I hear you all scream (cough cough). Well here it is in all its hideousness. I talked to my school, and no one there thought that it would be a problem putting it under the GPL. While I haven't put the official GPL stamp on this, consider it so (although why anyone else might want to take credit for this is beyond me). I would appreciate any additions/corrections to my code and I will attempt to incorporate any patches people send me.