mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 00:05:17 +03:00
Horus power loop fixed if power button is held pressed.
This commit is contained in:
parent
a0132fc4e7
commit
a575709088
2 changed files with 15 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue