Showroom USI example: parallel port
Hannes Mayer
h.mayer at inode.at
Fri Oct 8 20:48:57 CEST 2004
Paolo Mantegazza wrote:
> man ioperm, man iopl, at your choice.
Hi Paolo!
I always used #include <asm/io.h>, but #include <sys/io.h> seems to do
the trick. Thank you for the reminder to look into "man ioperm" again :-)
I managed to detect one interrupt, but after that no further interrupt is
detected.
Here is the while-loop in the thread of the USI example:
[...]
while (!end) {
do {
//ovr = rt_wait_intr_timed(intsem, nano2count(TIMEOUT), (void *)&retval);
ovr = rt_wait_intr(intsem, (void *)&retval);
hard_sti();
if (end) break;
if (ovr > 0) { // overrun processing, if any, goes here
rt_sem_signal(dspsem);
}
/* normal processing goes here */
intcnt++;
rt_sem_signal(dspsem);
rt_ack_irq(PARPORT_IRQ);
} while (ovr > 0);
rt_pend_linux_irq(PARPORT_IRQ);
}
[...]
With some printf's I found that the first interrupt is detected, the loop proceeds
to rt_pend_linux_irq, starts over again, but then it hangs at rt_wait_intr and no
further interrupt is detected.
I already added rt_ack_irq, which I use in my kernel modules, but that doesn't work
in this case.
What else must be done to detect further parallel port interrupts in user-space ?
Thank you very much in advance!
Best regards,
Hannes.
More information about the Rtai
mailing list