[Top][All Lists]

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

RE: [avr-libc-dev] Re: C++ Interrupts

From: Weddington, Eric
Subject: RE: [avr-libc-dev] Re: C++ Interrupts
Date: Sun, 20 Jan 2008 13:03:17 -0700


> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Joerg Wunsch
> Sent: Sunday, January 20, 2008 12:29 PM
> To: address@hidden
> Subject: Re: [avr-libc-dev] Re: C++ Interrupts
> As Dean Camera wrote:
> > My solution:
> > 
> >         #define CLASS_ISR(vector, ...) { vector(); } 
> ISR(vector, __VA_ARGS__)
> Thanks!
> > Which means you can name the function anything, and it should be
> > accessible as a normal function, but also link in as an ISR. As I
> > can't seem to get the intermixed assembly listing, I can't see how
> > effective it is, but it should allow you to call the ISR by the
> > member function name you give it, with either no penalty at all (if
> > the optimizer inlines it) or a small penalty of a JUMP instruction.
> Btw., I remember that Marek once mentioned an idea how the entire
> interrupt vector setup could be changed so arbitrarily named interrupt
> vectors are possible.  However, I cannot find his idea at a quick
> glance in my archive of avr-libc-dev, so I guess it has been discussed
> in avr-gcc-list by its time (which I do not archive personally).  I
> just remembered that idea when Ron asked that question in
> avrfreaks.net because I think it will also provide a solution.

Perhaps Marek could comment?

Eric W.

reply via email to

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