Poweroff LCD before reboot / poweroff

... fixes several MCU issues
This commit is contained in:
d0k3 2017-07-11 20:55:53 +02:00
parent 730b88638d
commit c60237a8c3
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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);