Maker Pro
Maker Pro

Using ISR() Macro in AVR-GCC

V

Vivek B

Jan 1, 1970
0
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.
 
B

BobG

Jan 1, 1970
0
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.
 
Top