Using ISR() Macro in AVR-GCC

Feb 22, 2008 1 Replies

Hi folks,



My code is handling both timer0 interrupt and SPI interrupt. And I don't want to loose any of the SPI interrupts and hence thought of making the timer0 ISR to work in NOBLOCK mode. But when i use



ISR(TIMER0_COMP_vect, ISR_NOBLOCK) { /* Code */



}

the compiler gives an error: "macro "ISR" passed 2 arguments, but takes just 1"



where it works fine for



ISR(TIMER0_COMP_vect) { /* Code */



}


-----------------------!!!!!!!!----------------------



Right now I am implementing the code as follows



ISR(TIMER0_COMP_vect) { sei(); /* Code */



}

But I would like to use the first one. Isn't the first implementation suppose to work??



Anyone has any guess why it is not working...



Thank you ..



Vivek.


The gcc library maintainers read the forums at avrfreaks.net. Ask this question there. You will get an answer in minutes. I think ISR macro replaces SIG and INTR macros, one of which was re-entrant.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required