Expected Usage of Callback Parameter?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Expected Usage of Callback Parameter?

1,628件の閲覧回数
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 返答(返信)