From e9045d8b8a6896d7862ea0eb8002c3e452f9da9f Mon Sep 17 00:00:00 2001 From: Victor Aprea Date: Sun, 24 May 2015 20:35:23 -0400 Subject: [PATCH] Add missing case to detachinterrupt --- hardware/arduino/avr/cores/arduino/WInterrupts.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hardware/arduino/avr/cores/arduino/WInterrupts.c b/hardware/arduino/avr/cores/arduino/WInterrupts.c index d3fbf100e3..6663462be8 100644 --- a/hardware/arduino/avr/cores/arduino/WInterrupts.c +++ b/hardware/arduino/avr/cores/arduino/WInterrupts.c @@ -223,6 +223,18 @@ void detachInterrupt(uint8_t interruptNum) { #warning detachInterrupt may need some more work for this cpu (case 1) #endif break; + + case 2: + #if defined(EIMSK) && defined(INT2) + EIMSK &= ~(1 << INT2); + #elif defined(GICR) && defined(INT2) + GICR &= ~(1 << INT2); // atmega32 + #elif defined(GIMSK) && defined(INT2) + GIMSK &= ~(1 << INT2); + #else + #warning detachInterrupt may need some more work for this cpu (case 2) + #endif + break; #endif }