I'm facing a little problem with function pointers in a code for the microcontroller Microchip Pic 18 Series.
The code below shows the prototypes of the functions involved in the problem and a call to the function 'insert_task', who should receive the address of the function 'task1' by the parameter 'task'.
However, I'm debugging the code in Proteus Isis and the parameter 'task' doesn't receive the address of the function passed as argument. More specifically, the parameter 'task' doesn't receive anything.
Anyone can see an error in the code?
void insert_task(uint8 priority, type_t type, void (*task)());
void task1();
insert_task(0, 0, task1);
The printscreen below shows the field "value" of the pointer "task" ("tarefa" in portuguese) without a value during the call of "insert_task" ("insere_tarefa" in portuguese).