Showroom USI example: parallel port
Paolo Mantegazza
mantegazza at aero.polimi.it
Fri Oct 8 10:49:20 CEST 2004
Hannes Mayer wrote:
> Hi all!
>
> I finally managed to get booting kernel and a working RTAI again!
> Many thanks to Philippe for his help!!! :-)))
>
> I just compiled the USI userspace interrupt example and it works fine.
> Now I tried to change the interrupt to the parallel port interrupt,
> but when I set the port to interrupt mode with "outb" I get a
> "Speicherzugriffsfehler", which translates as sort of
> "Memory access error".
>
> [...]
> if (!(dspsem = rt_sem_init(nam2num("DSPSEM"), 0))) {
> printf("CANNOT INIT SEMAPHORE > DSPSEM <\n");
> exit(1);
> }
>
> if (ioperm(BASEPORT, 3, 1)) {
> perror("ioperm open");
> rt_task_delete(maint);
> rt_sem_delete(intsem);
> rt_sem_delete(dspsem);
> exit(1);
> }
> outb(0x10, BASEPORT + 2); //set port to interrupt mode; pins are output
> pthread_create(&thread, NULL, timer_handler, NULL);
> [...]
>
> How can I set the parallel port to interrupt mode in the USI example ?
>
man ioperm, man iopl, at your choice.
Paolo.
More information about the Rtai
mailing list