On Sat, 6 Dec 2008 22:53:04 -0800, "ron minnich" rminnich@gmail.com wrote:
On Sat, Dec 6, 2008 at 9:52 PM, Joseph Smith joe@settoplinux.org wrote:
cat /proc/sys/dev/parport/parport0/base-addr 888 1912 Then turn the first number into hex (888 => 0x378)
boy do I feel dumb! I forgot entirely about that.
But why not use Stefan's idea of /dev/parportX?
Why do all this other work?
From everything I have read, there are two main ways to get control over
the parallel port.
One way is to use /dev/parportX. The /dev/parportX method is a higher level driver. I'm still looking into this to see if it will be better. I think Stefan was referring to the parport_find_base() function which wouldn't work for me. For that you input a base address and it returns the corresponding parallel port.
The other method is directly controlling the I/O. It is a lower level driver directly accessing the hardware. It is supposed to be faster, which will be good for flashing. It is also very simple, using outb and inb. This is the method I prefer. But it seems in all the examples I have looked at the the base address is statically defined. That is what I am trying to do is automate that.