From 674ac8a774f226a27f08e1021e39df5e28168efb Mon Sep 17 00:00:00 2001 From: Scott Allen Date: Tue, 20 Mar 2018 17:30:46 -0400 Subject: [PATCH] Don't disable timer 0 for Arduboy core --- src/Arduboy2.cpp | 2 ++ src/Arduboy2Core.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Arduboy2.cpp b/src/Arduboy2.cpp index 7242116..414eaa7 100644 --- a/src/Arduboy2.cpp +++ b/src/Arduboy2.cpp @@ -61,10 +61,12 @@ void Arduboy2Base::flashlight() sendLCDCommand(OLED_ALL_PIXELS_ON); // smaller than allPixelsOn() digitalWriteRGB(RGB_ON, RGB_ON, RGB_ON); +#ifndef ARDUBOY_CORE // for Arduboy core timer 0 should remain enabled // prevent the bootloader magic number from being overwritten by timer 0 // when a timer variable overlaps the magic number location, for when // flashlight mode is used for upload problem recovery power_timer0_disable(); +#endif while (true) { idle(); diff --git a/src/Arduboy2Core.cpp b/src/Arduboy2Core.cpp index 972185a..07c6b69 100644 --- a/src/Arduboy2Core.cpp +++ b/src/Arduboy2Core.cpp @@ -250,9 +250,11 @@ void Arduboy2Core::safeMode() { digitalWriteRGB(RED_LED, RGB_ON); +#ifndef ARDUBOY_CORE // for Arduboy core timer 0 should remain enabled // prevent the bootloader magic number from being overwritten by timer 0 // when a timer variable overlaps the magic number location power_timer0_disable(); +#endif while (true) { } }