Hi,
I have a function which is called from interrupt routine and main loop, let's call it f1(),since it is also called from main loop, so NOAREGS must be specified.
#pragma NOAREGS void f1(){...} #pragma AREGS
Then my question is whether following interrupt routine make sense ? From my view, they are same, but I am still not sure. Thanks in advance.
(1) Method one #pragma NOAREGS static void timer0_ISR (void) interrupt 1 using 2 { f1(); } #pragma AREGS
(2) Method two static void timer0_ISR (void) interrupt 1 { f1(); }
Daniel
the whole thing will end up with atomicity issues.
a very skilled, veru careful programmer MAY get by with "a function which is called from interrupt routine and main loop", but however skilled and careful the approach was, I would hate to see it and if i inhereited the project and saw ANY timing issues, my first action would be to separate.
SEPARATE the code, make two fi()
Erik.