6 bytes saved in flash (pulled from er9x)
This commit is contained in:
+6
-5
@@ -2552,22 +2552,23 @@ ISR(TIMER5_COMPA_vect, ISR_NOBLOCK) // mixer interrupt
|
||||
#if defined (PCBV4)
|
||||
ISR(TIMER2_COMPA_vect, ISR_NOBLOCK) //10ms timer
|
||||
#else
|
||||
// Clocks every 64 uS
|
||||
ISR(TIMER0_COMP_vect, ISR_NOBLOCK) //10ms timer
|
||||
#endif
|
||||
{
|
||||
cli();
|
||||
|
||||
#if defined (PCBV4)
|
||||
static uint8_t accuracyWarble = 4; // becasue 16M / 1024 / 100 = 156.25. So bump every 4.
|
||||
static uint8_t accuracyWarble = 4; // because 16M / 1024 / 100 = 156.25. So bump every 4.
|
||||
uint8_t bump = (!(accuracyWarble++ & 0x03)) ? 157 : 156;
|
||||
TIMSK2 &= ~(1<<OCIE2A); //stop reentrance
|
||||
TIMSK2 &= ~(1<<OCIE2A); // stop reentrance
|
||||
OCR2A += bump;
|
||||
#else
|
||||
TIMSK &= ~(1<<OCIE0); //stop reentrance
|
||||
TIMSK &= ~(1<<OCIE0); // stop reentrance
|
||||
#if defined (AUDIO)
|
||||
OCR0 += 2; // run much faster, to generate speaker tones
|
||||
OCR0 += 2; // interrupt every 128 uS
|
||||
#else
|
||||
static uint8_t accuracyWarble = 4; // becasue 16M / 1024 / 100 = 156.25. So bump every 4.
|
||||
static uint8_t accuracyWarble = 4; // because 16M / 1024 / 100 = 156.25. So bump every 4.
|
||||
uint8_t bump = (!(accuracyWarble++ & 0x03)) ? 157 : 156;
|
||||
OCR0 += bump;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user