We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9f38307 + 1d45980 commit 660b98dCopy full SHA for 660b98d
digistump-avr/libraries/DigisparkIRLib/IRLibTimer.h
@@ -109,8 +109,8 @@
109
#define TIMER_RESET
110
#define TIMER_ENABLE_PWM (TCCR0A |= _BV(COM0B1))
111
#define TIMER_DISABLE_PWM (TCCR0A &= ~(_BV(COM0B1)))
112
-#define TIMER_ENABLE_INTR (TIMSK = _BV(OCIE0A))
113
-#define TIMER_DISABLE_INTR (TIMSK = 0)
+#define TIMER_ENABLE_INTR (TIMSK |= _BV(OCIE0A))
+#define TIMER_DISABLE_INTR (TIMSK &= ~(_BV(OCIE0A)))
114
#define TIMER_INTR_NAME TIMER0_COMPA_vect
115
#define TIMER_CONFIG_KHZ(val) ({ \
116
const uint8_t pwmval = SYSCLOCK / 2000 / (val); \
0 commit comments