diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 4f827b026..c21dfd7a7 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -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(); diff --git a/radio/src/targets/horus/board_horus.cpp b/radio/src/targets/horus/board_horus.cpp index ffb766d4a..9898f2a47 100644 --- a/radio/src/targets/horus/board_horus.cpp +++ b/radio/src/targets/horus/board_horus.cpp @@ -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;