Expected Usage of Callback Parameter?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Expected Usage of Callback Parameter?

1,176 Views
gearhead1107
Contributor IV

I'm trying to make a generic timer interrupt callback function, and use Processor Expert to specify the device that caused the interrupt. 

For instance:

timer_ISR(uint8_t device)

{

/* Do Stuff */

}

In Processor Expert's configuration for the Flex Timer, I specified "timer_ISR" for the callback successfully, however it's not clear how to get the parameter I require into the function. 

If I specify "1" for device 1, the compiler doesn't like that this is creating a "void * channelsCallbacksParams" of "1"

If I create a uint8_t variable for the device I want, the compiler cannot find it when it compiles the generated code

If I create an array of "userData", it also can't find it..

Some guidance here would be appreciated - I can't seem to find any help in the documentation.

0 Replies