Quoth [EMAIL PROTECTED] <>: > I'd like to make a simple program for testing interrupts on a > MCF5206e running µClinux. > > My interrupt source is TIMER2, I already configured it for generating > periodic interrupts and it works. I also know how to clear the > corresponding interrupt flag. > > My questions are the following : > > - Can I use the request_irq() function ? > - Can I register my interrupt handler from my main program ?
If by "main program" you mean "kernel driver" (or module), then yes. If you mean "userspace program", then no. Interrupts can only be handled by drivers. > I tried to include the file <linux/interrupt.h> but I always got > errors from it. Which I suspect means you were trying it from userspace. You can't do that. > Can you give me a simple code example ? I don't need a complicated > driver, I just want to call a function when interrupt happens from my > test program. Have a look at the LDD3 book, it has a whole chapter on how to use interrupts from drivers. And driver code isn't all that complicated. > Thank you by advance and please excuse me for my poor English... Actually your English is pretty good :) _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
