Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Hello,
I am trying to build a simple TI-RTOS timer HWI. My ISR executes but I cannot figure out the right way of passing an argument (say, a simple int) to the function.
Here is my ISR (simple):
//------------------------------------------------------------------
void timer0_isr(int i){
if(i){
GPIO_write(Board_LED0, Board_LED_ON);
GPIO_write(Board_LED1, Board_LED_ON);
}
}
//------------------------------------------------------------------
And in my timer config file I set "Timer ISR function" field to "timer0_isr."
Now, if I define a variable in main() and enter that variable's name in the "Argument passed to Timer ISR function" the LED's light up regardless of the value of the passed variable (0 or 1.)
I think that I am not passing the variable to the ISR correctly. What is the proper way of doing it?
Thank you,
svl123