Skip to content

Commit e9045d8

Browse files
committedMay 25, 2015
Add missing case to detachinterrupt
1 parent de671f7 commit e9045d8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎hardware/arduino/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)
Please sign in to comment.