Hi, all,
I'm trying to call a function from an array, like this..
char f_cnt;
void fun1(void)
{
//some code
}
//---------------------
void fun2(void)
{
//some code
}
//---------------------
void fun3(void)
{
//some code
}
//---------------------
void (*call_fun[])() PROGMEM = { fun1, fun2, fun3}; //This puts the addresses
in code memory(seems
so from the .lst file).
//----------------------
void main(void)
{
(*call_fun[f_cnt])(); //But here I get a 'ld' instruction. How to
cause an LPM instruction
to get the function address before the 'icall' ?
}
//---------------------
Many Thanks,
--Royce.