Skip to content

Commit 28c25f2

Browse files
committed
Add missing case to detachinterrupt
1 parent 8bd408f commit 28c25f2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

avr/cores/arduino/WInterrupts.c

+12
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,18 @@ void detachInterrupt(uint8_t interruptNum) {
223223
#warning detachInterrupt may need some more work for this cpu (case 1)
224224
#endif
225225
break;
226+
227+
case 2:
228+
#if defined(EIMSK) && defined(INT2)
229+
EIMSK &= ~(1 << INT2);
230+
#elif defined(GICR) && defined(INT2)
231+
GICR &= ~(1 << INT2); // atmega32
232+
#elif defined(GIMSK) && defined(INT2)
233+
GIMSK &= ~(1 << INT2);
234+
#else
235+
#warning detachInterrupt may need some more work for this cpu (case 2)
236+
#endif
237+
break;
226238
#endif
227239
}
228240

0 commit comments

Comments
 (0)