Showroom USI example: parallel port

Hannes Mayer h.mayer at inode.at
Thu Oct 7 21:22:00 CEST 2004


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 ?

Thanks a lot in advance!

Best regards,
Hannes.





More information about the Rtai mailing list