PickyBiker
Well-known member
I found this page for using interrupts on teensy 4.0. https://www.pjrc.com/teensy/interrupts.html
The code example shown there does not compile in the Arduino IDE, it give an error
According to the Interrupt Vector, Mask & Flag Names chart, the name TIMER0_OVF_vect is correct.
What am I missing?
Code:
#include <avr/io.h>
#include <avr/interrupt.h>
void setup() {
}
void loop() {
}
ISR(TIMER0_OVF_vect)
{
/* Timer 0 overflow */
}
The code example shown there does not compile in the Arduino IDE, it give an error
Arduino: 1.8.19 (Windows 10), TD: 1.56, Board: "Teensy 4.0, Serial, 600 MHz, Faster, US English"
TeensyInterruopts:12: error: expected constructor, destructor, or type conversion before '(' token
ISR(TIMER0_OVF_vect)
^
TeensyInterruopts:12: error: expected constructor, destructor, or type conversion before '(' token
ISR(TIMER0_OVF_vect)
^
expected constructor, destructor, or type conversion before '(' token
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
According to the Interrupt Vector, Mask & Flag Names chart, the name TIMER0_OVF_vect is correct.
What am I missing?