X9E: turn off top lcd and both backlights when powering off
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user