[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] 2 interrupt sharing the same ISR
From: |
Ned Konz |
Subject: |
Re: [avr-gcc-list] 2 interrupt sharing the same ISR |
Date: |
Fri, 14 Jan 2005 15:58:17 -0800 |
User-agent: |
KMail/1.7.1 |
On Friday 14 January 2005 2:21 pm, gouy yann wrote:
> I'd like to know if someone has an easy trick to make
> 2 interrupts ( timer overflow and timer output compare
> ) jump to the same address (ISR).
>
> duplicating the code or calling the same function from
> the ISRs is not that much convincing in term of flash
> or stack comsumption.
>
> I am considering using only the output compare as
> overflow is somehow a particular case of it.
Why not just do something like this (atmega8):
// SIGNAL(SIG_OVERFLOW1)
//
#define METOO_INTERRUPT(signame) \
void signame (void) __attribute__ ((naked)); \
void signame (void) { __asm__ __volatile__ ("" ::); }
METOO_INTERRUPT(SIG_OVERFLOW1)
SIGNAL(SIG_OUTPUT_COMPARE1A)
{
}
--
Ned Konz
http://bike-nomad.com