Disable idle PWM interrupt by default (Only use if needed)

This commit is contained in:
Josh Stewart 2016-02-03 08:22:51 +11:00
parent c312b749fc
commit b0812889c0
1 changed files with 5 additions and 0 deletions

View File

@ -14,6 +14,11 @@ Currently limited to on/off control and open loop PWM and stepper drive
*/
void initialiseIdle()
{
//By default, turn off the PWM interrupt (It gets turned on below if needed)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
else { TIMSK1 &= ~(1 << OCIE1A); } // Disable timer channel
#endif
//Initialising comprises of setting the 2D tables with the relevant values from the config pages
switch(configPage4.iacAlgorithm)
{