1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-13 11:29:51 +03:00

Bsongis/x9lite pwr fix (#6501)

X9 Pwr fix
This commit is contained in:
Bertrand Songis 2019-06-14 21:19:26 +02:00 committed by GitHub
parent 7c3ad50e7d
commit c3388dc65e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 306 additions and 353 deletions

View file

@ -209,8 +209,8 @@ int main()
RCC_APB2PeriphClockCmd(LCD_RCC_APB2Periph | BACKLIGHT_RCC_APB2Periph | RCC_APB2Periph_SYSCFG, ENABLE);
keysInit();
boardPreInit();
pwrInit();
pwrOff();
// wait for inputs to stabilize
for (uint32_t i = 0; i < 50000; i += 1) {
@ -227,7 +227,6 @@ int main()
rotaryEncoderInit();
#endif
pwrInit();
pwrOn();
delaysInit(); // needed for lcdInit()
@ -489,12 +488,7 @@ int main()
if (state != ST_FLASHING && state != ST_USB) {
if (pwrOffPressed()) {
lcdClear();
lcdOff(); // this drains LCD caps
pwrOff();
for (;;) {
// Wait for power to go off
}
boardOff();
}
}