mirror of https://github.com/MLXXXp/Arduboy2.git
Don't disable timer 0 for Arduboy core
This commit is contained in:
parent
9a13011474
commit
674ac8a774
|
@ -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();
|
||||||
|
|
|
@ -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) { }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue