|
@@ -168,8 +168,8 @@ static void initISR(timer16_Sequence_t timer) {
|
168
|
168
|
SBI(TIFR, OCF3A); // clear any pending interrupts;
|
169
|
169
|
SBI(ETIMSK, OCIE3A); // enable the output compare interrupt
|
170
|
170
|
#else
|
171
|
|
- TIFR3 = _BV(OCF3A); // clear any pending interrupts;
|
172
|
|
- TIMSK3 = _BV(OCIE3A) ; // enable the output compare interrupt
|
|
171
|
+ SBI(TIFR3, OCF3A); // clear any pending interrupts;
|
|
172
|
+ SBI(TIMSK3, OCIE3A); // enable the output compare interrupt
|
173
|
173
|
#endif
|
174
|
174
|
#ifdef WIRING
|
175
|
175
|
timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service); // for Wiring platform only
|
|
@@ -183,7 +183,7 @@ static void initISR(timer16_Sequence_t timer) {
|
183
|
183
|
TCCR4B = _BV(CS41); // set prescaler of 8
|
184
|
184
|
TCNT4 = 0; // clear the timer count
|
185
|
185
|
TIFR4 = _BV(OCF4A); // clear any pending interrupts;
|
186
|
|
- TIMSK4 = _BV(OCIE4A) ; // enable the output compare interrupt
|
|
186
|
+ TIMSK4 = _BV(OCIE4A); // enable the output compare interrupt
|
187
|
187
|
}
|
188
|
188
|
#endif
|
189
|
189
|
|
|
@@ -193,7 +193,7 @@ static void initISR(timer16_Sequence_t timer) {
|
193
|
193
|
TCCR5B = _BV(CS51); // set prescaler of 8
|
194
|
194
|
TCNT5 = 0; // clear the timer count
|
195
|
195
|
TIFR5 = _BV(OCF5A); // clear any pending interrupts;
|
196
|
|
- TIMSK5 = _BV(OCIE5A) ; // enable the output compare interrupt
|
|
196
|
+ TIMSK5 = _BV(OCIE5A); // enable the output compare interrupt
|
197
|
197
|
}
|
198
|
198
|
#endif
|
199
|
199
|
}
|
|
@@ -203,21 +203,21 @@ static void finISR(timer16_Sequence_t timer) {
|
203
|
203
|
#ifdef WIRING
|
204
|
204
|
if (timer == _timer1) {
|
205
|
205
|
CBI(
|
206
|
|
- #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
207
|
|
- TIMSK1
|
208
|
|
- #else
|
209
|
|
- TIMSK
|
210
|
|
- #endif
|
|
206
|
+ #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
|
207
|
+ TIMSK1
|
|
208
|
+ #else
|
|
209
|
+ TIMSK
|
|
210
|
+ #endif
|
211
|
211
|
, OCIE1A); // disable timer 1 output compare interrupt
|
212
|
212
|
timerDetach(TIMER1OUTCOMPAREA_INT);
|
213
|
213
|
}
|
214
|
214
|
else if (timer == _timer3) {
|
215
|
215
|
CBI(
|
216
|
|
- #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
217
|
|
- TIMSK3
|
218
|
|
- #else
|
219
|
|
- ETIMSK
|
220
|
|
- #endif
|
|
216
|
+ #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
|
217
|
+ TIMSK3
|
|
218
|
+ #else
|
|
219
|
+ ETIMSK
|
|
220
|
+ #endif
|
221
|
221
|
, OCIE3A); // disable the timer3 output compare A interrupt
|
222
|
222
|
timerDetach(TIMER3OUTCOMPAREA_INT);
|
223
|
223
|
}
|