[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] avr-g++ and interrupt vectors
From: |
Nils Kristian Strom |
Subject: |
[avr-gcc-list] avr-g++ and interrupt vectors |
Date: |
05 Jul 2002 18:59:58 +0200 |
Hi!
I am experimenting with C++ on the AVR, trying to implement a simple
class for a timer. I ran into a problem when trying to declare the ISR
as part of the class.
In plain old C, my ISR looks like this:
SIGNAL( SIG_OVERFLOW1 )
{
timer_count++;
}
In my C++ implementation what must I use ?
I would expect something like
SIGNAL( SIG_OVERFLOW1 ) // <- Make vector jump to Timer::Interrupt
Timer::Interrupt()
{
count++;
}
The main issue is that Timer::Interrupt() should be a private member
function of Timer. If not, I could use the plain C alternative and make
Timer::count public, however, this is not what I want.
Regards,
Nils
avr-gcc-list at http://avr1.org
- [avr-gcc-list] avr-g++ and interrupt vectors,
Nils Kristian Strom <=