Compatibility for the Mega2561
This commit is contained in:
parent
a9798517e9
commit
3d68d1859e
|
@ -287,7 +287,7 @@ ISR(TIMER3_COMPB_vect, ISR_NOBLOCK) //fuelSchedule2
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) //AVR chips use the ISR for this
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) //AVR chips use the ISR for this
|
||||
ISR(TIMER3_COMPC_vect, ISR_NOBLOCK) //fuelSchedule3
|
||||
#elif defined (CORE_TEENSY) && defined (__MK20DX256__)
|
||||
void timer3compareCinterrupt() //Most ARM chips can simply call a function
|
||||
|
@ -308,7 +308,7 @@ void timer3compareCinterrupt() //Most ARM chips can simply call a function
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) //AVR chips use the ISR for this
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) //AVR chips use the ISR for this
|
||||
ISR(TIMER4_COMPB_vect, ISR_NOBLOCK) //fuelSchedule4
|
||||
#elif defined (CORE_TEENSY) && defined (__MK20DX256__)
|
||||
void timer4compareBinterrupt() //Most ARM chips can simply call a function
|
||||
|
@ -329,7 +329,7 @@ void timer4compareBinterrupt() //Most ARM chips can simply call a function
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) //AVR chips use the ISR for this
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) //AVR chips use the ISR for this
|
||||
ISR(TIMER5_COMPA_vect, ISR_NOBLOCK) //ignitionSchedule1
|
||||
#elif defined (CORE_TEENSY) && defined (__MK20DX256__)
|
||||
void timer5compareAinterrupt() //Most ARM chips can simply call a function
|
||||
|
@ -353,7 +353,7 @@ void timer5compareAinterrupt() //Most ARM chips can simply call a function
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) //AVR chips use the ISR for this
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) //AVR chips use the ISR for this
|
||||
ISR(TIMER5_COMPB_vect, ISR_NOBLOCK) //ignitionSchedule2
|
||||
#elif defined (CORE_TEENSY) && defined (__MK20DX256__)
|
||||
void timer5compareBinterrupt() //Most ARM chips can simply call a function
|
||||
|
@ -377,7 +377,7 @@ void timer5compareBinterrupt() //Most ARM chips can simply call a function
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) //AVR chips use the ISR for this
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) //AVR chips use the ISR for this
|
||||
ISR(TIMER5_COMPC_vect, ISR_NOBLOCK) //ignitionSchedule3
|
||||
#elif defined (CORE_TEENSY) && defined (__MK20DX256__)
|
||||
void timer5compareCinterrupt() //Most ARM chips can simply call a function
|
||||
|
@ -401,7 +401,7 @@ void timer5compareCinterrupt() //Most ARM chips can simply call a function
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) //AVR chips use the ISR for this
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) //AVR chips use the ISR for this
|
||||
ISR(TIMER4_COMPA_vect, ISR_NOBLOCK) //ignitionSchedule4
|
||||
#elif defined (CORE_TEENSY) && defined (__MK20DX256__)
|
||||
void timer4compareAinterrupt() //Most ARM chips can simply call a function
|
||||
|
|
|
@ -150,7 +150,9 @@ volatile bool fpPrimed = false; //Tracks whether or not the fuel pump priming ha
|
|||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) //ATmega2561 does not have Serial3
|
||||
if (configPage1.canEnable) { Serial3.begin(115200); }
|
||||
#endif
|
||||
|
||||
//Setup the dummy fuel and ignition tables
|
||||
//dummyFuelTable(&fuelTable);
|
||||
|
@ -754,6 +756,7 @@ void loop()
|
|||
command();
|
||||
}
|
||||
}
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) //ATmega2561 does not have Serial3
|
||||
//if Can interface is enabled then check for serial3 requests.
|
||||
if (configPage1.canEnable)
|
||||
{
|
||||
|
@ -765,6 +768,7 @@ void loop()
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// if (configPage1.displayType && (mainLoopCount & 255) == 1) { updateDisplay();} //Displays currently disabled
|
||||
|
||||
|
|
Loading…
Reference in New Issue