mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Poweroff LCD before reboot / poweroff
... fixes several MCU issues
This commit is contained in:
parent
730b88638d
commit
c60237a8c3
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user