0

I want to modify my program so that I can ensure my linux system can give my C application 100% uninterrupted access to my parallel port.

I have the following statements in my program already:

if (ioperm(0x378,3,1) ==-1){printf("Access denied");return -1;}
...
outb(data,0x378);

Essentially I request permission then do direct I/O with the port but it doesn't seem like direct I/O because sometimes when I use it, somewhere extra incorrect bytes are written to it (I'm guessing interrupt signals) which is throwing my homemade programmer off.

The linux manual suggested the use of the iopl function so between the statements above I added:

if (iopl(3) ==-1){printf("Error");return -1;}

but the iopl() made no difference.

Is there some kind of function I can use for C that would allow ONLY my program to access the parallel port and allow all others to access it only after my program terminates?

Mike -- No longer here
  • 2,064
  • 1
  • 15
  • 37

0 Answers0