Hello, everyone, I developed a character device which
is plugged into the parallel port of computer. A
printer can be connected at the rear of this device.
That means that all the printing information will pass
through my device. When my device and the printer work
at the same time the two devices affect with each
other. Both devices work innormally. There is some
kind of confliction. I know the exact reason. In my
device driver I just simply send and read the data
from my device directly without checking whether the
parallel port resource is available. That is a
problem. Now I am just wondering in Linux how can I
check whether the parallel port resource is avaliable.
I need to add that kind of code to my device driver.
Thank you very much.
______________________________________________________________________
File your taxes online! http://taxes.yahoo.ca
> problem. Now I am just wondering in Linux how can I
> check whether the parallel port resource is avaliable.
> I need to add that kind of code to my device driver.
> Thank you very much.
Use the parport api instead of banging directly on the hardware. That
supports the needed resource handling as well as isolating non PC
parallel weirdness. drivers/paride/.. has lots of examples