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.
1 parent 6ca6b11 commit 68ad726Copy full SHA for 68ad726
digistump-avr/libraries/DigisparkRGB/DigisparkRGB.cpp
@@ -37,10 +37,19 @@ void DigisparkRGBBegin() {
37
DigisparkPWMcompbuff[1] = 0x00;// set default PWM values
38
DigisparkPWMcompbuff[2] = 0x00;// set default PWM values
39
40
-
+#ifdef TIFR
41
TIFR = (1 << TOV0); // clear interrupt flag
42
- TIMSK = (1 << TOIE0); // enable overflow interrupt
43
- TCCR0B = (1 << CS00); // start timer, no prescale
+#endif
+#ifdef TIFR0
44
+ TIFR0 = (1 << TOV0); // clear interrupt flag
45
46
+ #ifdef TIMSK
47
+ TIMSK = (1 << TOV0); // enable overflow interrupt
48
49
+#ifdef TIMSK0
50
+ TIMSK0 = (1 << TOV0); // enable overflow interrupt
51
52
+
53
54
sei();
55
}
0 commit comments