Skip to content

Commit c0d0e42

Browse files
committed
Check if INT2 is actually defined before issuing warning in detachInterrupt
This was caused after: arduino/Arduino#3221
1 parent 28c25f2 commit c0d0e42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

avr/cores/arduino/WInterrupts.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ void detachInterrupt(uint8_t interruptNum) {
231231
GICR &= ~(1 << INT2); // atmega32
232232
#elif defined(GIMSK) && defined(INT2)
233233
GIMSK &= ~(1 << INT2);
234-
#else
234+
#elif defined(INT2)
235235
#warning detachInterrupt may need some more work for this cpu (case 2)
236236
#endif
237237
break;

0 commit comments

Comments
 (0)