I am facing a small problem with pointers to functions in a program for Microchip Pic Series 18 microcontrollers.
The code shows the prototypes of two functions involved in the problem and a call to the function 'insert_tarefa', which MUST receive the address of the 'task1' function through the 'task' parameter.
However, I'm debugging the code in Proteus Isis and the 'task' parameter does not get the address of the function passed as argument. Being more specific, the 'task' parameter receives absolutely nothing.
What am I doing wrong?
void insere_tarefa(uint8 prioridade, tipo_t tipo, void (*tarefa)());
void tarefa1();
insere_tarefa(0, 0, tarefa1);
The printscreen below shows the "value" field of the "task" pointer with no value during the call of the function "insert_task".
Has anyone ever had this kind of problem? How did you decide?