Looking at the specs for the Enhanced Parallel Port there seems to be an interrupt line. I want to use this line to trigger an interrupt which can then be used to send a pulse to a process.
Does this map directly to the printer interrupt??, ie IRQ7.
I am using InterruptAttachEvent to attach an event to interrupt 7, but this doesn’t seems to work.
You probably need to enable the interrupt by calling InterruptUnmask(). Unlike most PC interrupts, I believe QNX doesn’t enable this one, as its own port driver doesn’t use the interrupt.
I have found out that I need to set bit 4 in the parallel port control register to make the ACK/Interrupt line cause an interrupt.
I have written a small program to do this. It works, the bit is set and when I run my program again to read in the value the bit is set. If I wait a few seconds longer the bit has been cleared.
Is their some other program that is clering this bit in the control register??, resource manager ???