6 bytes saved in flash (pulled from er9x)

This commit is contained in:
bsongis
2012-07-05 10:31:26 +00:00
parent a761db40a2
commit 3cb83df6cd
5 changed files with 21 additions and 19 deletions
+6 -5
View File
@@ -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