We have two tiles 0 and 1;
Tile 1 - has a periodical timer
Tile 0 - has to enable or disable the timer on Tile 1.
Tile 1 code:
Code: Select all
while(1){
select {
case if_timer0_en_flag => timer0 when timerafter(time0) :> timer0:
time0 += PERIOD;
/*Do Something*/
break;
...
}
}
void tile1_enable_timer0(){ if_timer0_en_flag = 1; }
void tile1_disable_timer0(){ if_timer0_en_flag = 0; }
tile1_enable_timer0()
and
tile1_disable_timer0()
functions, when it is needed.
Is it ok?
Perhaps there is a better way?