Fix example
This commit is contained in:
parent
7ebe201f96
commit
6726836631
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#define PWM_PIN 3
|
#define PWM_PIN 3
|
||||||
|
|
||||||
#define DDS_USE_ONLY_TIMER2 false
|
#define DDS_USE_ONLY_TIMER2 true
|
||||||
#define TIMER2_PHASE_ADVANCE 24
|
#define TIMER2_PHASE_ADVANCE 24
|
||||||
|
|
||||||
DDS dds;
|
DDS dds;
|
||||||
|
@ -40,13 +40,11 @@ ISR(TIMER2_OVF_vect) {
|
||||||
}
|
}
|
||||||
#else // Use the ADC timer instead
|
#else // Use the ADC timer instead
|
||||||
ISR(ADC_vect) {
|
ISR(ADC_vect) {
|
||||||
if(false){
|
|
||||||
static unsigned char tcnt = 0;
|
static unsigned char tcnt = 0;
|
||||||
TIFR1 = _BV(ICF1); // Clear the timer flag
|
TIFR1 = _BV(ICF1); // Clear the timer flag
|
||||||
if(++tcnt == 4) {
|
if(++tcnt == 4) {
|
||||||
tcnt = 0;
|
tcnt = 0;
|
||||||
}
|
}
|
||||||
dds.clockTick();
|
dds.clockTick();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue