1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 08:15:17 +03:00

Horus power loop fixed if power button is held pressed.

This commit is contained in:
Damjan Adamic 2016-03-12 19:12:14 +01:00
parent a0132fc4e7
commit a575709088
2 changed files with 15 additions and 2 deletions

View file

@ -311,7 +311,7 @@
#define cli()
#define sei()
extern void boardInit();
#if defined(PCBTARANIS)
#if defined(PCBTARANIS) or defined(PCBHORUS)
extern void boardOff();
#else
#define boardOff() pwrOff();

View file

@ -167,7 +167,20 @@ void boardInit()
ledBlue();
}
#endif
void boardOff()
{
BACKLIGHT_OFF();
while (pwrPressed()) {
wdt_reset();
}
SysTick->CTRL = 0; // turn off systick
pwrOff();
}
#endif // #if !defined(SIMU)
#if defined(USB_JOYSTICK) && !defined(SIMU)
extern USB_OTG_CORE_HANDLE USB_OTG_dev;