Skip to content

Commit b860f4d

Browse files
committed
pwm sensor allowed arduino uno attach interrupt
1 parent 7382429 commit b860f4d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/sensors/MagneticSensorPWM.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ void MagneticSensorPWM::enableInterrupt(void (*doPWM)()){
9595
// declare it's interrupt based
9696
is_interrupt_based = true;
9797

98-
#if !defined(__AVR_ATmega328P__) && !defined(__AVR_ATmega168__) && !defined(__AVR_ATmega328PB__) && !defined(__AVR_ATmega2560__) // if mcu is not atmega328 && if mcu is not atmega2560
99-
// enable interrupts on pwm input pin
100-
attachInterrupt(digitalPinToInterrupt(pinPWM), doPWM, CHANGE);
101-
#endif
98+
// enable interrupts on pwm input pin
99+
attachInterrupt(digitalPinToInterrupt(pinPWM), doPWM, CHANGE);
102100
}

0 commit comments

Comments
 (0)