Quote:
|
Originally Posted by misterikkit
So wait, I don't quite understand how to use interrupts. Are those macros you're using to refer to interrupt pins?
|
No, I'm manipulating the memory-mapped bits directly. The bits are defined in ifi_picdefs.h.
Quote:
|
Originally Posted by misterikkit
Do I have to write code that invokes the handler?
|
No, that's one of the cool things about interrupts: The hardware executes your code in the interrupt handler automatically when some event happens (e.g., a timer rolls-over or an interrupt pin changes from a 0 to a 1).
What you do need to do is configure the interrupt hardware so it knows how to behave (e.g., interrupt on the rising-edge or falling-edge of the signal on the interrupt pin). Have a look at the interrupt initialization routines for a description of the various ways to configure an interrupt. Also have a look at user_routines_fast.c because this is where the interrupt handlers are mapped to the different types of interrupts.
My goal is to get folks using interrupts, so if you have additional questions, ask away.
-Kevin