Page 1 of 1

Using Public - Local - Macro’s

Posted: Wed Mar 17, 2010 12:29 pm
by Taurus
Hi,

I have a problem with Macro’s
One of them called “Local”, is with local variable into the macro.
The other one called “Public”, is without local variable.

The problem is that I can’t use the “Local Macro” in an interrupt macro.
What is the reason for this. :oops:

Re: Using Public - Local - Macro’s

Posted: Wed Mar 17, 2010 1:26 pm
by Benj
Hello Taurus

The "Local" macro has parameters rather then local variables. If you remove the parameters and change them to local variables then the function should then appear in the interrupt enable list. You can do this by bringing up the local macro and then clicking Macro -> Edit.

The reason you cannot have parameters on an interrupt macro is because there is no way to assign the parameters. The call is generated via the interrupt rather then via a line of C that would define parameters.