Don't disable timer 0 for Arduboy core

This commit is contained in:
Scott Allen 2018-03-20 17:30:46 -04:00
parent 9a13011474
commit 674ac8a774
2 changed files with 4 additions and 0 deletions

View File

@ -61,10 +61,12 @@ void Arduboy2Base::flashlight()
sendLCDCommand(OLED_ALL_PIXELS_ON); // smaller than allPixelsOn() sendLCDCommand(OLED_ALL_PIXELS_ON); // smaller than allPixelsOn()
digitalWriteRGB(RGB_ON, RGB_ON, RGB_ON); 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 // prevent the bootloader magic number from being overwritten by timer 0
// when a timer variable overlaps the magic number location, for when // when a timer variable overlaps the magic number location, for when
// flashlight mode is used for upload problem recovery // flashlight mode is used for upload problem recovery
power_timer0_disable(); power_timer0_disable();
#endif
while (true) { while (true) {
idle(); idle();

View File

@ -250,9 +250,11 @@ void Arduboy2Core::safeMode()
{ {
digitalWriteRGB(RED_LED, RGB_ON); 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 // prevent the bootloader magic number from being overwritten by timer 0
// when a timer variable overlaps the magic number location // when a timer variable overlaps the magic number location
power_timer0_disable(); power_timer0_disable();
#endif
while (true) { } while (true) { }
} }