Hello everyone,
I trying to set up my own interrupt routine and not use AttachInterrupt() because I want to read out the interrupt flag to track the source.
When compiling this code and other example codes I get this same error:
SelfProgInterrupt:26: error: expected unqualified-id before '{' token
{
^
expected unqualified-id before '{' token
I noticed that in the core files the avr/interrupt.h is empty.
If anyone has a suggestion as to how to resolve this issue I'd be grateful to hear
I trying to set up my own interrupt routine and not use AttachInterrupt() because I want to read out the interrupt flag to track the source.
When compiling this code and other example codes I get this same error:
SelfProgInterrupt:26: error: expected unqualified-id before '{' token
{
^
expected unqualified-id before '{' token
I noticed that in the core files the avr/interrupt.h is empty.
If anyone has a suggestion as to how to resolve this issue I'd be grateful to hear
Code:
#include <avr/io.h>
#include <avr/interrupt.h>
#define ISR(Vector)
int int_pin1 = 15;
int led = 13;
volatile byte state = HIGH;
void setup() {
pinMode(int_pin1, INPUT);
pinMode(led, OUTPUT);
pinMode(12, OUTPUT);
pinMode(int_pin1, INPUT_PULLUP);
}
void loop() {
digitalWrite(12, HIGH);
delay(100);
digitalWrite(12, LOW);
delay(100);
}
ISR(INT1_vect)
{
state = !state;
}