mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
X9E: turn off top lcd and both backlights when powering off
This commit is contained in:
parent
8f75c8a1e0
commit
0f15828093
4 changed files with 13 additions and 0 deletions
|
@ -338,6 +338,7 @@ void bt_wakeup(void);
|
|||
// Top LCD driver
|
||||
#if defined(REV9E)
|
||||
void topLcdInit(void);
|
||||
void topLcdOff();
|
||||
void topLcdRefreshStart(void);
|
||||
void topLcdRefreshEnd(void);
|
||||
void setTopFirstTimer(uint32_t value);
|
||||
|
|
|
@ -440,6 +440,7 @@
|
|||
#define DATA_HIGH GPIO_VA->BSRRL = PIN_VA_DATA
|
||||
#define DATA_LOW GPIO_VA->BSRRH = PIN_VA_DATA
|
||||
#define VA_BL_ON GPIO_VA->BSRRL = PIN_VA_BL
|
||||
#define VA_BL_OFF GPIO_VA->BSRRH = PIN_VA_BL
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -261,6 +261,13 @@ void topLcdInit()
|
|||
topLcdRefreshEnd();
|
||||
}
|
||||
|
||||
void topLcdOff()
|
||||
{
|
||||
VA_BL_OFF;
|
||||
topLcdRefreshStart();
|
||||
topLcdRefreshEnd();
|
||||
}
|
||||
|
||||
void setTopFirstTimer(uint32_t value)
|
||||
{
|
||||
div_t qr = div(value, 60);
|
||||
|
|
|
@ -179,6 +179,10 @@ void menusTask(void * pdata)
|
|||
lcd_clear();
|
||||
lcdRefresh();
|
||||
lcdOff();
|
||||
BACKLIGHT_OFF();
|
||||
#if defined(REV9E)
|
||||
topLcdOff();
|
||||
#endif
|
||||
|
||||
#if !defined(SIMU)
|
||||
SysTick->CTRL = 0; // turn off systick
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue