static BOOL timer2_flag;
ISR(TIMER2_COMPA_vect)
{
timer2_flag = true;
}
int main(void)
{
...
timer2_flag = false;
while( !timer2_flag );
...
}
ISR(TIMER2_COMPA_vect)
{
timer2_flag = true;
}
int main(void)
{
...
timer2_flag = false;
while( !timer2_flag );
...
}