avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-chat] C++ Interrupts


From: Weddington, Eric
Subject: RE: [avr-chat] C++ Interrupts
Date: Wed, 16 Jan 2008 20:35:06 -0700

 

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden
>  On Behalf Of Ron Kreymborg
> Sent: Wednesday, January 16, 2008 6:42 PM
> To: address@hidden
> Subject: [avr-chat] C++ Interrupts
> 
> Hi Folks
> 
> In the past I have handled peripheral interrupts by a simple 
> vector into a
> class public method:
> 
> ISR(TIMER0_OVF_vect)
> {
>     Timer0.OverflowInterrupt();
> }
> 
> However, IMHO a more elegant C++ solution would be to define 
> the interrupt
> handler as a private function within the class. 
> 
> Hardly practical, so can anyone suggest a declaration that 
> would make this
> link automatic within avr-gcc?
> 

Avr-gcc is expecting a fixed name for the vector. See avr-libc for how
the ISR macro is defined.

Note that there is no C++ maintainer for AVR GCC.

Eric Weddington




reply via email to

[Prev in Thread] Current Thread [Next in Thread]