i am trying to work with interrupts and tried this simple example.
but it does not compile.
i get this error:
error: expected constructor, destructor, or type conversion before '(' token
i am on osx 10.8.5 arduion IDE 1.0.5, downloaded teensy just yersterday.
???
thanks.
Code:
#include <avr/io.h>
#include <avr/interrupt.h>
volatile unsigned int overflow_count=0;
void setup(){
Serial1.begin(250000);
}
void loop(){
}
ISR(TIMER0_OVF_vect)
{
/* Timer 0 overflow */
if (overflow_count < 0xFFFF) overflow_count++;
}