5.1.5 But what about INTERRUPT?

If you read avr/signal.h, you will notice that there is another macro called INTERRUPT. Indeed, you can define ISRs using INTERRUPT instead of SIGNAL.

However, ISRs defined with INTERRUPT have the global interrupt reenabled in the body of the subroutine. This is potentially very risky and it lead to bugs that are very difficult to reproduce.

I recommend using SIGNAL instead of INTERRUPT unless there is a strong reason.



Copyright © 2006-02-15 by Tak Auyeung