Hello
I'm using codewarrior IDE for a MC9s08JM16 cpu.
I'm trying to use a interrupt with parameters. When I write the next interrupt in the MCUinit.c file:
__interrupt void isrVkeyboard(bool ON)
{
ON = ~ON;
if(ON) // Si está encendido el motor
{
LedVerde = 1;
}else{ // Si está parado el motor
LVerde = 0;
}
KBISC_KBACK = 1;
}
I got an error point out that this error is pinpointed in the next function:
static void (* near const _vect[])(void) @0xFFC4 = { /* Interrupt vector table */
isrVrtc, /* Int.no. 29 Vrtc (at FFC4) Used */
UNASSIGNED_ISR, /* Int.no. 28 Viic (at FFC6) Unassigned */
-> isrVkeyboard, /* Int.no. 25 Vkeyboard (at FFCC) Used */
....
_Startup
};
Any suggestion?
Hi,
Could you possibly describe what are you trying to achieve by passing the parameter to the interrupt handler?
Interrupt handler is called/executed asynchronously typically by a hardware event so IMAO there is no chance to pass any parameter to it.
Therefore interrupts are typically declared as void functions without partameters.
What about using global variable instead of parameter?
Hope it helps.
Stan