From c60237a8c3f03c97a068638ba56c41b51c479620 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Tue, 11 Jul 2017 20:55:53 +0200 Subject: [PATCH] Poweroff LCD before reboot / poweroff ... fixes several MCU issues --- source/common/common.h | 2 +- source/common/power.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source/common/common.h b/source/common/common.h index 87cf5f60c..b29553143 100644 --- a/source/common/common.h +++ b/source/common/common.h @@ -49,7 +49,7 @@ #endif // GodMode9 version -#define VERSION "1.2.6" +#define VERSION "1.2.7" // input / output paths #define SUPPORT_PATHS "0:/gm9/support", "0:", "0:/files9" // legacy paths diff --git a/source/common/power.c b/source/common/power.c index 4b91905ab..ec6ccaadb 100644 --- a/source/common/power.c +++ b/source/common/power.c @@ -1,10 +1,9 @@ #include "power.h" #include "i2c.h" #include "cache.h" -#include "ui.h" void Reboot() { - ClearScreenF(true, true, COLOR_STD_BG); + I2C_writeReg(I2C_DEV_MCU, 0x22, 1 << 0); // poweroff LCD to prevent MCU hangs flushEntireDCache(); if (I2C_writeReg(I2C_DEV_MCU, 0x20, 1 << 2)) while(true); @@ -12,7 +11,7 @@ void Reboot() { void PowerOff() { - ClearScreenF(true, true, COLOR_STD_BG); + I2C_writeReg(I2C_DEV_MCU, 0x22, 1 << 0); // poweroff LCD to prevent MCU hangs flushEntireDCache(); if (I2C_writeReg(I2C_DEV_MCU, 0x20, 1 << 0)) while (true);