Skip to content

Commit 711ff1a

Browse files
author
dave
committed
#26 fix bug with basic interrupt abstraction and update example to configure input. Tested fully on AVR.
1 parent 7396092 commit 711ff1a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

examples/marshalInterrupt/marshalInterrupt.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ void setup() {
3434
Serial.begin(115200);
3535
Serial.println("Starting interrupt example");
3636

37+
pinMode(interruptPin, INPUT_PULLUP);
38+
3739
taskManager.setInterruptCallback(interruptTask);
3840
taskManager.addInterrupt(&interruptAbstraction, interruptPin, CHANGE);
3941
}

src/BasicInterruptAbstraction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ inline void internalHandleInterrupt(pintype_t pin, RawIntHandler fn, uint8_t mod
1616
#elif defined(PARTICLE)
1717
::attachInterrupt(pin, fn, (InterruptMode)mode);
1818
#else
19-
::attachInterrupt(pin, fn, mode);
19+
::attachInterrupt(digitalPinToInterrupt(pin), fn, mode);
2020
#endif // Interrupt mode conditionals
2121
}
2222

0 commit comments

Comments
 (0)