µTasker Forum
µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: akorud on August 17, 2009, 04:07:00 PM
-
Hi,
I'm setting interrupt handler using uTasker functionality:
INTERRUPT_SETUP interrupt_setup;
interrupt_setup.int_type = PORT_INTERRUPT;
interrupt_setup.int_priority = (INTERRUPT_LEVEL_3);
interrupt_setup.int_handler = irq_handler; // handling function
interrupt_setup.int_port_bit = 3; // The IRQ input connected
interrupt_setup.int_port_sense = IRQ_RISING_EDGE; // Interrupt on this edge
fnConfigureInterrupt((void *)&interrupt_setup);
code is compilted with GCC. Do I need to add __attribute__((interrupt_handler))
to my handler function?
-
Hi
Your handling function is a call-back form the interrupts routine.
This means that it is a 'normal' routine and doesn't need to be declared as an interrupt. It also doesn't need to handle the interrupting peripheral since this is performed by the interrupt handler.
Regards
Mark