> > Not always safe - if interrupt is level triggered, and remains > > active, the main program will be interrupted again and again... > > This will make the main program run much slower (interrupt and > > "reti" after every instruction), but work fine otherwise - so > > it may be difficult to notice the bug (no handler defined for an > > enabled interrupt).
Marek, thanks for the weighty remark. Nevertheless, I tend to a variant with returning. Why? In practice more often the mistake happens such: "no handler defined for an enabled interrupt". The situation when the user initiated interruptions which actually it in any way did not plan to use is improbable. (At least, by the moment of end of the project). Really, it can not notice delay of the program, but hardly incomplete functionality of system will be covered from its look. On the other hand, in this case the user can localize at once malfunction (a debugging output, LED...). While in a variant with cycling the user can say only: "My controller has died." Dmitry. _______________________________________________ AVR-libc-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-libc-dev
