Hello Gents, I am having problem communicating between main.c and another file/module, ui.c to name it.
In main.c I set a flag from a timer ISR, every 100ms. In ui.c I am watching for that flag, but unfortunately it always reads zero :-/ However if I watch for the flag in main() then it works fine. I am watching the flag in ui.c, so I declared it in ui.h, then ui.h gets included in main.c so I can set the flag from there. Well that was my reasoning, but doesn't quite work sadly ! I must be doing something wrong obviously, just would love to learn what it is ! ;-) Regards, -- Vince, a bit stuck and wondering again... ui.h ----------- static volatile uint8_t flag; ui.c ---------------- if( flag ) { flag = 0; /* Do some stuff */ } main.c -------- #include "ui.h" ISR (TIMER0_COMP_vect) { flag = 1; } main() {} _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list