[stock/gruvin9x] Better synchro when the mixer duration increases! Safety check on mixer interval.

This commit is contained in:
bsongis
2012-11-21 10:10:12 +00:00
parent 92a7363abc
commit efe8c2ec8c
8 changed files with 19 additions and 21 deletions
-3
View File
@@ -34,14 +34,11 @@
#ifndef board_gruvin9x_h
#define board_gruvin9x_h
extern uint16_t nextMixerTime;
#define TIMER_16KHZ_VECT TIMER2_OVF_vect
#define COUNTER_16KHZ TCNT2
#define TIMER_10MS_VECT TIMER2_COMPA_vect
#define PAUSE_10MS_INTERRUPT() TIMSK2 &= ~(1<<OCIE2A)
#define RESUME_10MS_INTERRUPT() TIMSK2 |= (1<<OCIE2A)
#define SCHEDULE_MIXER(delay) nextMixerTime = getTmr16KHz() + (delay)
#define PAUSE_PULSES_INTERRUPT() TIMSK1 &= ~(1<<OCIE1A)
#define RESUME_PULSES_INTERRUPT() TIMSK1 |= (1<<OCIE1A)
#define PAUSE_PPMIN_INTERRUPT() TIMSK3 &= ~(1<<ICIE3)