[Top][All Lists]

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

Re: [avr-gcc-list] How to handle interrupt vectors ?

From: Pink Boy
Subject: Re: [avr-gcc-list] How to handle interrupt vectors ?
Date: Tue, 28 Oct 2008 12:05:37 -0700 (PDT)

Charalampos Alexopoulos sez,

> Thank you for your answer, but i am not looking for the
> easiest way. I want to have some solution similar to previus 
> example. I can use ISR's even with c++ with no problem, what 
> i need, as i said before, is  to assign a  vector as  a static 
> class member in a way similar to other types like :
> class foo
> {
>     public:
>           static constant uint8_t data = 0x0a;
>           ...
> }
> then you can use it from some other class like:
> uint8_t local_data = foo::data;

You scare me.  Run away.

I always worry with C++ that I really don't understand what the 
compiler is doing when it calls functions.  I guess my thought is
that if you can't define the function as an isr inside the class
then what you are trying to do isn't supported.

If I were you and I'm not, I would have an ISR call your static
function, then exit.  That will most likely work.  In general
though I like to keep what I'm do in an ISR very simple (buffer
data, generate events, time critical stuff) and let the main loop 
or a task handle the complex stuff.

Mr Foo

reply via email to

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